|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.tribe.messages.ChannelMessage
This class defines a ChannelMessage.
A ChannelMessage is made of chunks, the last chunk of the message containing the destination key to be used for message routing at reception.
Constructor Summary | |
ChannelMessage(java.lang.Object destinationKey)
Creates a new ChannelMessage object |
|
ChannelMessage(java.lang.Object destinationKey,
int numberOfChunks)
Creates a new ChannelMessage object |
Method Summary | |
void |
addChunk(java.io.Serializable chunk)
Adds a chunk to this message |
void |
deliverMessage(java.util.HashMap receiveBuffers)
Delivers the message to all receive buffers that are registered to the message destination key. |
byte[] |
getByteArray()
Get a byte array representation of the message. |
java.util.ArrayList |
getChunks()
Get the whole list of chunks. |
java.lang.Object |
getDestinationKey()
Defines the destination key used for message delivery at the receiving host. |
java.lang.Object |
removeChunk()
Remove the last chunk. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ChannelMessage(java.lang.Object destinationKey)
ChannelMessage
object
destinationKey
- receive buffer key for message deliverypublic ChannelMessage(java.lang.Object destinationKey, int numberOfChunks)
ChannelMessage
object
destinationKey
- receive buffer key for message deliverynumberOfChunks
- number of chunks in the message if known in advanceMethod Detail |
public void addChunk(java.io.Serializable chunk)
chunk
- the message chunk to addpublic java.util.ArrayList getChunks()
ArrayList
of chunks (Objects).public java.lang.Object removeChunk()
public java.lang.Object getDestinationKey()
ReceiveBuffer
must has been registered with this
destination key at the receiver end for the message to be delivered.
public void deliverMessage(java.util.HashMap receiveBuffers) throws NoReceiverException
receiveBuffers
- list of destination receive buffers
NoReceiverException
- if no receive buffer has been registered for
the destination key found in the messagepublic byte[] getByteArray()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |