|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--hypercast.DT.DT_Message
This class defines a DT protocol message, which contains a type (byte), a Overlay hash(int) and 4 AddressPairs. The Src and Dst AddressPairs can not both be null. Its format in byte array is as following: ------------------------------------------------------------ | Protocol | Length | Type | Overlay ID hash | | 8 bits | 16 bits | 8 bits | 32 bits | ---------------------------------------------------------------------------- | Src | Dst | ADDR1 | ADDR2 | | 112 bits | 112 bits | 112 bits | 112 bits | ----------------------------------------------------------------------------
Field Summary | |
static byte |
Beacon
A message type used with Multicasting |
static byte |
Goodbye
A message type |
static byte |
HelloNeighbor
A message type |
static byte |
HelloNotNeighbor
A message type |
static byte |
IAmHere
A message type used with Buddies |
static byte |
IAmLeader
A message type used to broadcast leader address pair |
static byte |
NewNode
A message type |
static byte |
NodePing
A message type |
static byte |
NodePong
A message type |
static byte |
PROTONUM_DT30
Protocol Number value in the Protocol field of a DT3.0 protocol message |
static byte |
ServerReply
A message type |
static byte |
ServerRequest
A message type |
static byte |
TestMessage
A test type |
Constructor Summary | |
DT_Message(byte[] A,
hypercast.I_UnicastAdapter adapter)
Creates a message from a byte array. |
|
DT_Message(byte proto_sub,
int T,
int gh,
hypercast.DT.DT_AddressPair Src_arg,
hypercast.DT.DT_AddressPair Dst_arg,
hypercast.DT.DT_AddressPair CW_arg,
hypercast.DT.DT_AddressPair CCW_arg)
Constructor of DT_Message. |
|
DT_Message(hypercast.DT.DT_Message A)
Constructor. |
Method Summary | |
hypercast.DT.DT_AddressPair |
getCCW()
Returns the address pair of CCW neighbor with respect to the source of the message. |
hypercast.DT.DT_LogicalAddress |
getCCWLA()
Returns the logical address of CCW neighbor with respect to the source of the message. |
hypercast.I_PhysicalAddress |
getCCWPA()
Returns the physical address of CCW neighbor with respect to the source of the message. |
hypercast.DT.DT_AddressPair |
getCW()
Returns the address pair of CW neighbor with respect to the source of the message. |
hypercast.DT.DT_LogicalAddress |
getCWLA()
Returns the logical address of CW neighbor with respect to the source of the message. |
hypercast.I_PhysicalAddress |
getCWPA()
Returns the physical address of CW neighbor with respect to the source of the message. |
hypercast.DT.DT_AddressPair |
getDst()
Returns the address pair of the destination of the message. |
hypercast.DT.DT_LogicalAddress |
getDstLA()
Returns the logical address of the destination of the message. |
hypercast.I_PhysicalAddress |
getDstPA()
Returns the physical address of the destination of the message. |
java.lang.String |
getLabel()
Returns the name of the message according to its type. |
hypercast.DT.DT_AddressPair |
getLeader()
the same as getCW |
hypercast.DT.DT_LogicalAddress |
getLeaderLA()
Returns the logical address of CW neighbor with respect to the source of the message. |
hypercast.I_PhysicalAddress |
getLeaderPA()
Returns the physical address of CW neighbor with respect to the source of the message. |
int |
getOverlayHash()
Returns the overlayHash of this message. |
hypercast.DT.DT_AddressPair |
getSrc()
Returns the address pair of the source of the message. |
hypercast.DT.DT_LogicalAddress |
getSrcLA()
Returns the logical address of the source of the message. |
hypercast.I_PhysicalAddress |
getSrcPA()
Returns the physical address of the source of the message. |
static hypercast.DT.DT_Message |
restoreMessage(byte[] A,
int[] beginValidBytes,
int endValidBytes,
hypercast.I_UnicastAdapter adapter,
int thisOverlayHash)
Creates a message, if possible, from a byte array. |
byte[] |
toByteArray()
Converts the message into a byte array for transmission. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final byte HelloNeighbor
public static final byte HelloNotNeighbor
public static final byte Goodbye
public static final byte ServerRequest
public static final byte ServerReply
public static final byte NewNode
public static final byte NodePing
public static final byte NodePong
public static final byte IAmHere
public static final byte IAmLeader
public static final byte Beacon
public static final byte TestMessage
public static final byte PROTONUM_DT30
Constructor Detail |
public DT_Message(hypercast.DT.DT_Message A)
public DT_Message(byte proto_sub, int T, int gh, hypercast.DT.DT_AddressPair Src_arg, hypercast.DT.DT_AddressPair Dst_arg, hypercast.DT.DT_AddressPair CW_arg, hypercast.DT.DT_AddressPair CCW_arg)
public DT_Message(byte[] A, hypercast.I_UnicastAdapter adapter)
adapter
- used to create new PhysicalAddress from the byte array.Method Detail |
public static hypercast.DT.DT_Message restoreMessage(byte[] A, int[] beginValidBytes, int endValidBytes, hypercast.I_UnicastAdapter adapter, int thisOverlayHash)
adapter
- used to create new PhysicalAddress from the byte array.public byte[] toByteArray()
toByteArray
in interface I_Message
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getLabel()
public int getOverlayHash()
public hypercast.I_PhysicalAddress getSrcPA()
public hypercast.I_PhysicalAddress getDstPA()
public hypercast.I_PhysicalAddress getCCWPA()
public hypercast.I_PhysicalAddress getCWPA()
public hypercast.I_PhysicalAddress getLeaderPA()
public hypercast.DT.DT_LogicalAddress getSrcLA()
public hypercast.DT.DT_LogicalAddress getDstLA()
public hypercast.DT.DT_LogicalAddress getCCWLA()
public hypercast.DT.DT_LogicalAddress getCWLA()
public hypercast.DT.DT_LogicalAddress getLeaderLA()
public hypercast.DT.DT_AddressPair getSrc()
public hypercast.DT.DT_AddressPair getDst()
public hypercast.DT.DT_AddressPair getCCW()
public hypercast.DT.DT_AddressPair getCW()
public hypercast.DT.DT_AddressPair getLeader()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |