|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--edu.virginia.cs.mng.hypercast.HC.HC_Message
This class encapsulates a HC protocol message.
| Field Summary | |
static byte |
Beacon
Hypercast protocol message type (used to beacon all) |
private HC_LogicalAddress |
DestLA
Destination logical address |
private I_PhysicalAddress |
DestPA
Destination physical address |
private HC_LogicalAddress |
HRootLA
HRoot logical address |
private int |
HRootSeqNum
HRoot sequence number |
static byte |
Kill
Hypercast protocol message type (used to kill a node) |
private int |
LASize
Length of I_LogicalAddress in bytes |
static byte |
Leave
Hypercast protocol message type (used to leave the hypercube) |
private int |
overlayHash
A hash of overlay properties. |
private int |
PASize
Length of I_PhysicalAddress in bytes |
static byte |
Ping
Hypercast protocol message type (used to ping neighbor periodically) |
private HC_LogicalAddress |
SrcLA
Source logical address |
private I_PhysicalAddress |
SrcPA
Source physical address |
private int |
Type
Hypercast protocol message type |
| Constructor Summary | |
HC_Message(byte[] data,
int offset,
I_UnicastAdapter adapter)
Constructs a HC_Message with a byte array and an I_UnicastAdapter The following is the byte format followed Byte 0 : Type Bytes 1-4 : overlayHash Bytes 5-10 : SrcPA Bytes 11-14: SrcLA BYtes 15-20: DestPA Bytes 21-24: DestLA Bytes 25-28: HRootLA Bytes 29-32: HRootSeqNum |
|
HC_Message(byte type,
int gh,
I_PhysicalAddress srcp,
HC_LogicalAddress srcl,
I_PhysicalAddress desp,
HC_LogicalAddress desl,
HC_LogicalAddress hrootl,
int hrootsn,
byte[] data,
I_UnicastAdapter adapter)
Constructs a HC_Message with all the components |
|
| Method Summary | |
HC_LogicalAddress |
getDestLA()
Returns the destination logical address of the message |
I_PhysicalAddress |
getDestPA()
Returns the destination physical address of the message |
HC_LogicalAddress |
getHRootLA()
Returns the HRoot logical address of the message |
int |
getHRootSeqNum()
Returns the HRoot sequence number of the message |
int |
getOverlayHash()
Returns the overlayHash of this message. |
HC_LogicalAddress |
getSrcLA()
Returns the source logical address of the message |
I_PhysicalAddress |
getSrcPA()
Returns the source physical address of the message |
int |
getType()
Returns the type of the message |
static HC_Message |
restoreMessage(byte[] recvbuff,
int[] validBytesStart,
int validBytesEnd,
I_UnicastAdapter adapter,
int thisOverlaysHash)
|
byte[] |
toByteArray()
Converts message to byte array |
java.lang.String |
toString()
Converts the message object to String |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
public static final byte Ping
public static final byte Kill
public static final byte Beacon
public static final byte Leave
private int Type
private int overlayHash
private HC_LogicalAddress SrcLA
private HC_LogicalAddress DestLA
private I_PhysicalAddress SrcPA
private I_PhysicalAddress DestPA
private HC_LogicalAddress HRootLA
private int HRootSeqNum
private int PASize
private int LASize
| Constructor Detail |
public HC_Message(byte[] data,
int offset,
I_UnicastAdapter adapter)
The following is the byte format followed
Byte 0 : Type
Bytes 1-4 : overlayHash
Bytes 5-10 : SrcPA
Bytes 11-14: SrcLA
BYtes 15-20: DestPA
Bytes 21-24: DestLA
Bytes 25-28: HRootLA
Bytes 29-32: HRootSeqNum
data - an input byte arrayadapter - an I_UnicastAdapter object
public HC_Message(byte type,
int gh,
I_PhysicalAddress srcp,
HC_LogicalAddress srcl,
I_PhysicalAddress desp,
HC_LogicalAddress desl,
HC_LogicalAddress hrootl,
int hrootsn,
byte[] data,
I_UnicastAdapter adapter)
type - the typesrcp - source PhysicalAddress objectsrcl - source LogicalAddress objectdesp - destination PhysicalAddress objectdesl - destination LogicalAddress objecthrootl - HRoot LogicalAddress objecthrootsn - HRoot sequence numberdata - payload data array| Method Detail |
public static HC_Message restoreMessage(byte[] recvbuff,
int[] validBytesStart,
int validBytesEnd,
I_UnicastAdapter adapter,
int thisOverlaysHash)
public byte[] toByteArray()
public int getType()
public int getOverlayHash()
public I_PhysicalAddress getDestPA()
public HC_LogicalAddress getSrcLA()
public HC_LogicalAddress getDestLA()
public HC_LogicalAddress getHRootLA()
public int getHRootSeqNum()
public I_PhysicalAddress getSrcPA()
public java.lang.String toString()
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||