|
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.MessageDispatch
An object which remembers the mapping from names to MessageReceivers and dispatches messages by request. For consistent routing, modified to only deliver messages to applications if the PastryNode.isReady(). It will still deliver messages to any non-PastryAppl because these "services" may be needed to boot the node into the ring. Any messages to a PastryAppl will be buffered until the node goes ready. TODO: We need to make it explicit which apps can receive messages before PastryNode.isReady().
Field Summary | |
static java.lang.String |
BUFFER_IF_NOT_READY_PARAM
DESCRIBE THE FIELD |
static java.lang.String |
BUFFER_SIZE_PARAM
DESCRIBE THE FIELD |
protected PastryNode |
localNode
DESCRIBE THE FIELD |
protected Logger |
logger
DESCRIBE THE FIELD |
Constructor Summary | |
MessageDispatch(PastryNode pn)
Constructor. |
Method Summary | |
void |
destroy()
DESCRIBE THE METHOD |
boolean |
dispatchMessage(Message msg)
Dispatches a message to the appropriate receiver. |
boolean |
dispatchMessage(RawMessageDelivery msg)
DESCRIBE THE METHOD |
PastryAppl |
getDestination(Message msg)
Gets the Destination attribute of the MessageDispatch object |
PastryAppl |
getDestinationByAddress(int addr)
Gets the DestinationByAddress attribute of the MessageDispatch object |
void |
registerReceiver(int address,
PastryAppl receiver)
Registers a receiver with the mail service. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected PastryNode localNode
protected Logger logger
public static final java.lang.String BUFFER_IF_NOT_READY_PARAM
public static final java.lang.String BUFFER_SIZE_PARAM
Constructor Detail |
public MessageDispatch(PastryNode pn)
pn
- DESCRIBE THE PARAMETERMethod Detail |
public PastryAppl getDestination(Message msg)
msg
- DESCRIBE THE PARAMETER
public PastryAppl getDestinationByAddress(int addr)
addr
- DESCRIBE THE PARAMETER
public void registerReceiver(int address, PastryAppl receiver)
receiver
- the receiver.address
- DESCRIBE THE PARAMETERpublic boolean dispatchMessage(Message msg)
msg
- the message.
public boolean dispatchMessage(RawMessageDelivery msg)
msg
- DESCRIBE THE PARAMETER
public void destroy()
|
Rice Pastry API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |