|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object network.Packet network.XMLPacket
A Packet with an XML payload.
Field Summary | |
static java.lang.String |
EVERYONE
The address indicating everyone |
Fields inherited from class network.Packet |
IP, IP_REQUEST, NUM_TYPES, XML |
Constructor Summary | |
XMLPacket(byte[] xml,
java.lang.String from,
java.lang.String to,
long id)
|
Method Summary | |
void |
decrementTTL()
Decrements the timeToLive of the packet. |
java.lang.String |
getFrom()
|
long |
getId()
|
byte[] |
getSignature()
Get the signature |
java.lang.String |
getTo()
|
int |
getTTL()
|
byte[] |
getXML()
|
boolean |
isTTLZero()
|
void |
setSignature(byte[] sig)
Sets the signature of the message |
void |
setTTL(int ttl)
Sets the TTL to the given value |
Methods inherited from class network.Packet |
getType |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String EVERYONE
Constructor Detail |
public XMLPacket(byte[] xml, java.lang.String from, java.lang.String to, long id)
xml
- The XML payloadfrom
- The virtual address of the sender.to
- The virtual address of the recipient.Method Detail |
public byte[] getXML()
public java.lang.String getFrom()
public java.lang.String getTo()
public void decrementTTL()
public boolean isTTLZero()
public int getTTL()
public void setTTL(int ttl)
ttl
- The int for the TTL to setpublic byte[] getSignature()
public void setSignature(byte[] sig)
sig
- The signature (signed message digest)public long getId()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |