|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--hypercast.SPT.SPT_Message
This class encapsulates a SPT protocol message. The message contains a type (byte), a Overlay hash(int) and 4 AddressPairs. Other fields are related to SPT protocol
Field Summary | |
static byte |
Goodbye
Goodbye message. |
static byte |
Hello
Beacon message |
static byte |
PROTONUM_SPT30
Protocol Number value in the Protocol field of a SPT3.0 protocol message |
static byte |
RouteReply
Sent to reply a route request message |
static byte |
RouteRequest
Sent when the routing information for some destination is unknown |
Constructor Summary | |
SPT_Message(byte[] A,
hypercast.I_UnicastAdapter adapter)
Creates a message from a byte array. |
|
SPT_Message(byte proto_sub,
byte T,
int gh,
hypercast.SPT.SPT_AddressPair ma)
Constructor for Goodbye message |
|
SPT_Message(byte proto_sub,
byte T,
int gh,
hypercast.SPT.SPT_AddressPair ma,
hypercast.SPT.SPT_LogicalAddress pd)
Constructor for RouteRequest message |
|
SPT_Message(byte proto_sub,
byte T,
int gh,
hypercast.SPT.SPT_AddressPair ma,
hypercast.SPT.SPT_LogicalAddress nh,
hypercast.SPT.SPT_LogicalAddress pd)
Constructor for RouteReply message |
|
SPT_Message(byte proto_sub,
byte T,
int gh,
hypercast.SPT.SPT_AddressPair ma,
hypercast.SPT.SPT_LogicalAddress ra,
hypercast.SPT.SPT_LogicalAddress pa,
int ct,
long ts,
java.util.Hashtable sl,
short reli)
Constructor for Hello message. |
|
SPT_Message(hypercast.SPT.SPT_Message A)
Constructor a new SPT_Message A from an existing message |
Method Summary | |
boolean |
containsSender(hypercast.SPT.SPT_LogicalAddress la)
To do adjacency test |
int |
getCost()
|
java.lang.String |
getLabel()
Returns the name of the message according to its type. |
hypercast.SPT.SPT_LogicalAddress |
getNextHop()
for RouteReply message |
int |
getOverlayHash()
Returns the overlayHash of this message. |
hypercast.SPT.SPT_LogicalAddress |
getParent()
|
hypercast.SPT.SPT_LogicalAddress |
getPathDst()
for RouteRequest/RouteReply message |
int |
getPathMetric()
|
int |
getReversedOneHopReliability(hypercast.SPT.SPT_LogicalAddress la)
get one hop reversed reliability |
hypercast.SPT.SPT_LogicalAddress |
getRoot()
|
int |
getRootId()
|
hypercast.SPT.SPT_AddressPair |
getSelf()
|
int |
getSenderSize()
|
hypercast.SPT.SPT_AddressPair |
getSrc()
|
int |
getSrcId()
|
hypercast.SPT.SPT_LogicalAddress |
getSrcLA()
|
hypercast.I_PhysicalAddress |
getSrcPA()
|
long |
getTimeStamp()
|
boolean |
isNeighbor(hypercast.SPT.SPT_LogicalAddress la)
|
static hypercast.SPT.SPT_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 Hello
public static final byte Goodbye
public static final byte RouteRequest
public static final byte RouteReply
public static final byte PROTONUM_SPT30
Constructor Detail |
public SPT_Message(hypercast.SPT.SPT_Message A)
A
- the existing messagepublic SPT_Message(byte proto_sub, byte T, int gh, hypercast.SPT.SPT_AddressPair ma, hypercast.SPT.SPT_LogicalAddress ra, hypercast.SPT.SPT_LogicalAddress pa, int ct, long ts, java.util.Hashtable sl, short reli)
public SPT_Message(byte proto_sub, byte T, int gh, hypercast.SPT.SPT_AddressPair ma)
public SPT_Message(byte proto_sub, byte T, int gh, hypercast.SPT.SPT_AddressPair ma, hypercast.SPT.SPT_LogicalAddress pd)
public SPT_Message(byte proto_sub, byte T, int gh, hypercast.SPT.SPT_AddressPair ma, hypercast.SPT.SPT_LogicalAddress nh, hypercast.SPT.SPT_LogicalAddress pd)
public SPT_Message(byte[] A, hypercast.I_UnicastAdapter adapter)
adapter
- used to create new PhysicalAddress from the byte array.Method Detail |
public static hypercast.SPT.SPT_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 int getSenderSize()
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 hypercast.I_PhysicalAddress getSrcPA()
public hypercast.SPT.SPT_LogicalAddress getSrcLA()
public int getOverlayHash()
public hypercast.SPT.SPT_LogicalAddress getRoot()
public int getRootId()
public hypercast.SPT.SPT_AddressPair getSelf()
public hypercast.SPT.SPT_AddressPair getSrc()
public int getSrcId()
public hypercast.SPT.SPT_LogicalAddress getParent()
public int getCost()
public long getTimeStamp()
public hypercast.SPT.SPT_LogicalAddress getNextHop()
public hypercast.SPT.SPT_LogicalAddress getPathDst()
public boolean containsSender(hypercast.SPT.SPT_LogicalAddress la)
la
- a spt logical address
public boolean isNeighbor(hypercast.SPT.SPT_LogicalAddress la)
public int getPathMetric()
public int getReversedOneHopReliability(hypercast.SPT.SPT_LogicalAddress la)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |