DRCL JavaSim API

drcl.inet.contract
Class McastHostEvent

java.lang.Object
  |
  +--drcl.comp.Contract
        |
        +--drcl.inet.contract.McastHostEvent

public class McastHostEvent
extends Contract

The McastHostEvent contract. This contract defines the message format in a multicast host event (a join or leave event). The event is delivered to a multicast routing protocol component to handle the event when a host joins or leaves a multicast group.

The event object is a message consisting of:

  1. Event type: (JOIN or LEAVE),
  2. Multicast group: the host network joins/leaves,
  3. Index of the interface: at which that host network is connected to this router. The index may be less than zero if the router is multihomed and it joins/leaves itself.

This class provides a set of static methods to faciliate constructing the event object (createJoinEvent()s and createLeaveEvent()s).

Version:
1.0, 12/03/2000
Author:
Hung-ying Tyan

Inner Class Summary
static class McastHostEvent.Message
           
 
Field Summary
static McastHostEvent INSTANCE
           
static int JOIN
           
static int LEAVE
           
 
Fields inherited from class drcl.comp.Contract
Role_INITIATOR, Role_PEER, Role_REACTOR
 
Constructor Summary
McastHostEvent()
           
McastHostEvent(int role_)
           
 
Method Summary
static McastHostEvent.Message createJoinEvent(long group_, int ifindex_)
          Returns the JOIN event message.
static McastHostEvent.Message createJoinEvent(long src_, long group_, int ifindex_)
          Returns the JOIN event message.
static McastHostEvent.Message createJoinEvent(long src_, long srcmask_, long group_, int ifindex_)
          Returns the JOIN event message.
static McastHostEvent.Message createLeaveEvent(long group_, int ifindex_)
          Returns the LEAVE event message.
static McastHostEvent.Message createLeaveEvent(long src_, long group_, int ifindex_)
          Returns the LEAVE event message.
static McastHostEvent.Message createLeaveEvent(long src_, long srcmask_, long group_, int ifindex_)
          Returns the LEAVE event message.
 java.lang.Object getContractContent()
          Returns the content of this contract (format?).
 java.lang.String getName()
           
 
Methods inherited from class drcl.comp.Contract
getRole, match, setRole
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final McastHostEvent INSTANCE

JOIN

public static final int JOIN

LEAVE

public static final int LEAVE
Constructor Detail

McastHostEvent

public McastHostEvent()

McastHostEvent

public McastHostEvent(int role_)
Method Detail

getName

public java.lang.String getName()
Overrides:
getName in class Contract

getContractContent

public java.lang.Object getContractContent()
Description copied from class: Contract
Returns the content of this contract (format?).
Overrides:
getContractContent in class Contract

createJoinEvent

public static McastHostEvent.Message createJoinEvent(long group_,
                                                     int ifindex_)
Returns the JOIN event message.

createJoinEvent

public static McastHostEvent.Message createJoinEvent(long src_,
                                                     long group_,
                                                     int ifindex_)
Returns the JOIN event message.

createJoinEvent

public static McastHostEvent.Message createJoinEvent(long src_,
                                                     long srcmask_,
                                                     long group_,
                                                     int ifindex_)
Returns the JOIN event message.

createLeaveEvent

public static McastHostEvent.Message createLeaveEvent(long group_,
                                                      int ifindex_)
Returns the LEAVE event message.

createLeaveEvent

public static McastHostEvent.Message createLeaveEvent(long src_,
                                                      long group_,
                                                      int ifindex_)
Returns the LEAVE event message.

createLeaveEvent

public static McastHostEvent.Message createLeaveEvent(long src_,
                                                      long srcmask_,
                                                      long group_,
                                                      int ifindex_)
Returns the LEAVE event message.

DRCL JavaSim API

Copyright © 2001 - DRCL, OSU     ~ Back to JavaSim Home ~