|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.dream.message.AggregateMessageImpl
Extensible message implementation specialized for aggregate message (ie. message containing only sub messages).
Field Summary |
Fields inherited from interface org.objectweb.dream.message.Message |
EMPTY_MESSAGE_ARRAY |
Constructor Summary | |
AggregateMessageImpl()
|
Method Summary | |
void |
addChunk(String name,
ChunkType chkType,
Object chunk)
Throws a UnsupportedOperationException . |
void |
addSubMessage(Message message)
Adds a sub message in this message. |
boolean |
decrementReferenceCounter()
Decrements the reference counter of this message. |
Object |
getChunk(String name)
Returns a chunk of this message, or null if this message
doesn't have a chunk with the specified name. |
short |
getMessageManagerId()
Returns the id of the message manager that created this message. |
MessageType |
getMessageType()
Throws a UnsupportedOperationException . |
Iterator |
getSubMessageIterator()
Returns an Iterator that iterate over the sub messages of
this message. |
Message[] |
getSubMessages()
Returns an (eventually empty) array containing the sub messages of this message. |
void |
incrementReferenceCounter()
Increments the reference counter of the message. |
void |
recycle()
Recycles the object. |
Object |
removeChunk(String name)
Always return null . |
boolean |
removeSubMessage(Message message)
Removes the specified sub message. |
void |
removeSubMessages()
Removes every sub messages of this message. |
void |
setMessageManagerId(short id)
Sets the id of the message manager that created this message. |
void |
transfertChunkStates(Message newInstance)
Transferts the state of the message's chunks into the specified new instance. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AggregateMessageImpl()
Method Detail |
public void addChunk(String name, ChunkType chkType, Object chunk) throws ChunkAlreadyExistsException
UnsupportedOperationException
.
addChunk
in interface ExtensibleMessage
name
- the name of the new chunkchkType
- the type of the new chunkchunk
- the chunk instance.
ChunkAlreadyExistsException
- if this message has already a chunk
with the same nameExtensibleMessage.addChunk(String, ChunkType, Object)
public Object removeChunk(String name)
null
.
removeChunk
in interface ExtensibleMessage
name
- the name of the chunk to remove
null
if no chunk with the
specified name can be found.ExtensibleMessage.removeChunk(String)
public void addSubMessage(Message message)
ExtensibleMessage
addSubMessage
in interface ExtensibleMessage
message
- the message to add.ExtensibleMessage.addSubMessage(Message)
public boolean removeSubMessage(Message message)
ExtensibleMessage
removeSubMessage
in interface ExtensibleMessage
message
- the message to be removed.
true
if the message has been removed,
false
otherwise.ExtensibleMessage.removeSubMessage(Message)
public void removeSubMessages()
ExtensibleMessage
removeSubMessages
in interface ExtensibleMessage
ExtensibleMessage.removeSubMessages()
public short getMessageManagerId()
Message
getMessageManagerId
in interface Message
Message.getMessageManagerId()
public void setMessageManagerId(short id)
Message
setMessageManagerId
in interface Message
id
- the id of the message manager that created this message.Message.setMessageManagerId(short)
public Object getChunk(String name)
Message
null
if this message
doesn't have a chunk with the specified name.
getChunk
in interface Message
name
- the name of the chunk, as specified in the message type.
Message.getChunk(String)
public Iterator getSubMessageIterator()
Message
Iterator
that iterate over the sub messages of
this message.
getSubMessageIterator
in interface Message
Message.getSubMessageIterator()
public Message[] getSubMessages()
Message
getSubMessages
in interface Message
Message.getSubMessages()
public MessageType getMessageType()
UnsupportedOperationException
.
getMessageType
in interface Message
Message.getMessageType()
public void transfertChunkStates(Message newInstance)
Message
Note: the given new isntance contains all the chunks contained in this message.
transfertChunkStates
in interface Message
newInstance
- the new instance of message.Message.transfertChunkStates(Message)
public void recycle()
Recyclable
recycle
in interface Recyclable
Recyclable.recycle()
public void incrementReferenceCounter()
MessageReferenceCounter
incrementReferenceCounter
in interface MessageReferenceCounter
MessageReferenceCounter.incrementReferenceCounter()
public boolean decrementReferenceCounter()
MessageReferenceCounter
decrementReferenceCounter
in interface MessageReferenceCounter
true
if the reference counter is null.MessageReferenceCounter.decrementReferenceCounter()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |