|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.tribe.channel.ReceiveBuffer
This class defines a ReceiveBuffer which behaves as a FIFO buffer.
Constructor Summary | |
ReceiveBuffer(java.lang.Object bufferKey)
Creates a new ReceiveBuffer that collects messages sent to
the specified destination key. |
Method Summary | |
void |
addMessage(java.lang.Object message)
Adds a new message to the buffer. |
java.lang.Object |
getBufferKey()
Returns the destination key this buffer is interested in. |
ChannelMessage |
getMessage()
Get the first message from the buffer. |
boolean |
isEmpty()
Returns true if the buffer is empty. |
java.lang.Object |
removeMessage()
Removes the first message from the buffer. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ReceiveBuffer(java.lang.Object bufferKey)
ReceiveBuffer
that collects messages sent to
the specified destination key.
bufferKey
- message destination key.Method Detail |
public java.lang.Object getBufferKey()
public void addMessage(java.lang.Object message)
message
- Message to addpublic ChannelMessage getMessage() throws EmptyBufferException
EmptyBufferException
- if an error occurspublic java.lang.Object removeMessage() throws EmptyBufferException
EmptyBufferException
- if the buffer is emptypublic boolean isEmpty()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |