|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.dream.message.AbstractExtensibleMessage
org.objectweb.dream.message.BasicExtensibleMessage
org.objectweb.dream.message.BasicExtensibleMessageNC
Implementation of extensible message with named sub messages.
Field Summary |
Fields inherited from class org.objectweb.dream.message.AbstractExtensibleMessage |
chunkNames, chunks, chunkTypes, messageManagerId |
Fields inherited from interface org.objectweb.dream.message.Message |
EMPTY_MESSAGE_ARRAY |
Fields inherited from interface org.objectweb.dream.message.MessageType |
EMPTY_MESSAGE_TYPE_ARRAY |
Fields inherited from interface org.objectweb.dream.util.EmptyStringArray |
EMPTY_STRING_ARRAY |
Constructor Summary | |
BasicExtensibleMessageNC(short messageManagerId)
Constructor. |
Method Summary | |
void |
addSubMessage(String name,
Message message)
Adds a sub message in this message |
Message |
getSubMessage(String name)
Returns a sub message of this message, or null if this
message doesn't have a sub message with the specified name. |
Iterator |
getSubMessageIterator()
Returns an Iterator that iterate over the sub messages of
this message. |
String[] |
getSubMessageNames()
Returns an (eventually empty) array containing the sub message's names of messages of this type. |
Iterator |
getSubMessageNamesIterator()
Returns an iterator over the sub message's names of messages of this type. |
Message[] |
getSubMessages()
Returns an (eventually empty) array containing the sub messages of this message. |
MessageType |
getSubMessageType(String name)
Returns the type of the sub message having the specified name. |
MessageType[] |
getSubMessageTypes()
Returns an (eventually empty) array containing the types of the sub messages of messages of this type. |
Iterator |
getUnnamedSubMessageIterator()
Returns an Iterator that iterate over the unnamed sub
messages of this message. |
Message[] |
getUnnamedSubMessages()
Returns an (eventually empty) array containing the unnamed sub messages of this message. |
MessageType[] |
getUnnamedSubMessageTypes()
Returns an (eventually empty) array containing the types of the unnamed sub messages of messages of this type. |
Iterator |
getUnnamedSubMessageTypesIterator()
Returns an iterator over the types of the unnamed sub messages of messages of this type. |
Message |
removeSubMessage(String name)
Removes and returns the sub message with the specified name. |
Methods inherited from class org.objectweb.dream.message.BasicExtensibleMessage |
addSubMessage, getSubMessageTypesIterator, isSubTypeOf, removeSubMessage |
Methods inherited from class org.objectweb.dream.message.AbstractExtensibleMessage |
addChunk, decrementReferenceCounter, getChunk, getChunkNames, getChunkNamesIterator, getChunkType, getMessageManagerId, getMessageType, incrementReferenceCounter, isEmpty, recycle, removeChunk, setMessageManagerId, transfertChunkStates |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.objectweb.dream.message.ExtensibleMessage |
addChunk, addSubMessage, removeChunk, removeSubMessage |
Methods inherited from interface org.objectweb.dream.message.Message |
getChunk, getMessageManagerId, getMessageType, recycle, setMessageManagerId, transfertChunkStates |
Methods inherited from interface org.objectweb.dream.message.MessageType |
getChunkNames, getChunkNamesIterator, getChunkType, getSubMessageTypesIterator, isEmpty, isSubTypeOf |
Constructor Detail |
public BasicExtensibleMessageNC(short messageManagerId)
messageManagerId
- the id of the message manager that creates this
message.Method Detail |
public Message getSubMessage(String name)
MessageNC
null
if this
message doesn't have a sub message with the specified name.
getSubMessage
in interface MessageNC
name
- the name of the sub message, as specified in the message type.
MessageNC.getSubMessage(java.lang.String)
public String[] getSubMessageNames()
MessageTypeNC
getSubMessageNames
in interface MessageTypeNC
MessageTypeNC.getSubMessageNames()
public Iterator getSubMessageNamesIterator()
MessageTypeNC
getSubMessageNamesIterator
in interface MessageTypeNC
MessageTypeNC.getSubMessageNamesIterator()
public void addSubMessage(String name, Message message) throws MessageAlreadyExistException
ExtensibleMessageNC
addSubMessage
in interface ExtensibleMessageNC
name
- the name of this new sub message.message
- the message to add.
MessageAlreadyExistException
- if this message has already an
enclosed message with the same nameExtensibleMessageNC.addSubMessage(java.lang.String,
org.objectweb.dream.message.Message)
public Message removeSubMessage(String name)
ExtensibleMessageNC
removeSubMessage
in interface ExtensibleMessageNC
name
- the name of the enclosed message to remove.
null
if no sub message with
the specified name is found.ExtensibleMessageNC.removeSubMessage(java.lang.String)
public Iterator getUnnamedSubMessageIterator()
MessageNC
Iterator
that iterate over the unnamed sub
messages of this message.
getUnnamedSubMessageIterator
in interface MessageNC
MessageNC.getUnnamedSubMessageIterator()
public Message[] getUnnamedSubMessages()
MessageNC
getUnnamedSubMessages
in interface MessageNC
MessageNC.getUnnamedSubMessages()
public MessageType getSubMessageType(String name)
MessageTypeNC
getSubMessageType
in interface MessageTypeNC
name
- the name of one of the message types returned by
MessageTypeNC.getSubMessageNames()
.
null
if no sub message with the specified name
exists.MessageTypeNC.getSubMessageType(java.lang.String)
public MessageType[] getUnnamedSubMessageTypes()
MessageTypeNC
getUnnamedSubMessageTypes
in interface MessageTypeNC
MessageTypeNC.getUnnamedSubMessageTypes()
public Iterator getUnnamedSubMessageTypesIterator()
MessageTypeNC
getUnnamedSubMessageTypesIterator
in interface MessageTypeNC
MessageTypeNC.getUnnamedSubMessageTypesIterator()
public Iterator getSubMessageIterator()
Message
Iterator
that iterate over the sub messages of
this message.
getSubMessageIterator
in interface Message
getSubMessageIterator
in class BasicExtensibleMessage
Message.getSubMessageIterator()
public Message[] getSubMessages()
Message
getSubMessages
in interface Message
getSubMessages
in class BasicExtensibleMessage
Message.getSubMessages()
public MessageType[] getSubMessageTypes()
MessageType
getSubMessageTypes
in interface MessageType
getSubMessageTypes
in class BasicExtensibleMessage
MessageType.getSubMessageTypes()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |