|
Rice Pastry API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectrice.pastry.messaging.Message
public abstract class Message
This is an abstract implementation of a message object.
| Field Summary | |
|---|---|
static int |
DEFAULT_PRIORITY_LEVEL
|
| Fields inherited from interface rice.p2p.commonapi.Message |
|---|
DEFAULT_PRIORITY, HIGH_PRIORITY, LOW_PRIORITY, LOWEST_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. |
int |
getPriority()
Get priority |
NodeHandle |
getSender()
Get sender. |
Id |
getSenderId()
Get sender Id. |
protected void |
setPriority(int 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 timestamp| Method Detail |
|---|
public int getDestination()
public java.util.Date getDate()
public Id getSenderId()
public NodeHandle getSender()
public void setSender(NodeHandle nh)
the - immediate sender's NodeId.public int getPriority()
getPriority in interface Messageprotected void setPriority(int prio)
the - new priority.public 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 | |||||||||