|
Rice Pastry API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object rice.pastry.messaging.Message
This is an abstract implementation of a message object.
Field Summary | |
static int |
DEFAULT_PRIORITY_LEVEL
DESCRIBE THE FIELD |
Fields inherited from interface rice.p2p.commonapi.Message |
HIGH_PRIORITY, LOW_PRIORITY, MAX_PRIORITY, MEDIUM_HIGH_PRIORITY, MEDIUM_LOW_PRIORITY, MEDIUM_PRIORITY |
Constructor Summary | |
Message(int dest)
Constructor. |
|
Message(int dest,
java.util.Date timestamp)
Constructor. |
Method Summary | |
java.util.Date |
getDate()
Gets the timestamp of the message, if it exists. |
int |
getDestination()
Gets the address of message receiver that the message is for. |
byte |
getPriority()
Get priority |
NodeHandle |
getSender()
Get sender. |
Id |
getSenderId()
Get sender Id. |
protected void |
setPriority(byte prio)
Set priority. |
void |
setSender(NodeHandle nh)
Set sender Id. |
boolean |
stamp(java.util.Date time)
If the message has no timestamp, this will stamp the message. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int DEFAULT_PRIORITY_LEVEL
Constructor Detail |
public Message(int dest)
dest
- the destination.public Message(int dest, java.util.Date timestamp)
dest
- the destination.timestamp
- the timestampMethod Detail |
public int getDestination()
public java.util.Date getDate()
public Id getSenderId()
public NodeHandle getSender()
public byte getPriority()
getPriority
in interface Message
public void setSender(NodeHandle nh)
nh
- The new Sender valueprotected void setPriority(byte prio)
prio
- The new Priority valuepublic boolean stamp(java.util.Date time)
time
- the timestamp.
|
Rice Pastry API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |