org.objectweb.dream.message
Class BasicExtensibleMessage

java.lang.Object
  extended byorg.objectweb.dream.message.AbstractExtensibleMessage
      extended byorg.objectweb.dream.message.BasicExtensibleMessage
All Implemented Interfaces:
EmptyStringArray, ExtensibleMessage, Message, MessageType, Serializable
Direct Known Subclasses:
BasicExtensibleMessageNC

public class BasicExtensibleMessage
extends AbstractExtensibleMessage

Implementation of extensible message, using a LinkedListto store sub message

See Also:
Serialized Form

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
BasicExtensibleMessage(short messageManagerId)
          Constructor.
 
Method Summary
 void addSubMessage(Message message)
          Adds a sub message in this message.
 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.
 MessageType[] getSubMessageTypes()
          Returns an (eventually empty) array containing the types of the sub messages of messages of this type.
 Iterator getSubMessageTypesIterator()
          Returns an iterator over the types of the sub messages of messages of this type.
 boolean isSubTypeOf(MessageType t)
          Returns true if this message type if a sub type of the given message type.
 boolean removeSubMessage(Message msg)
          Removes the specified sub message.
 
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
 

Constructor Detail

BasicExtensibleMessage

public BasicExtensibleMessage(short messageManagerId)
Constructor.

Parameters:
messageManagerId - the id of the message manager that creates this message.
Method Detail

addSubMessage

public void addSubMessage(Message message)
Description copied from interface: ExtensibleMessage
Adds a sub message in this message.

Parameters:
message - the message to add.
See Also:
ExtensibleMessage.addSubMessage(Message)

removeSubMessage

public boolean removeSubMessage(Message msg)
Description copied from interface: ExtensibleMessage
Removes the specified sub message.

Parameters:
msg - the message to be removed.
Returns:
true if the message has been removed, false otherwise.
See Also:
ExtensibleMessage.removeSubMessage(Message)

getSubMessageIterator

public Iterator getSubMessageIterator()
Description copied from interface: Message
Returns an Iterator that iterate over the sub messages of this message.

Returns:
an iterator on the sub messages.
See Also:
Message.getSubMessageIterator()

getSubMessages

public Message[] getSubMessages()
Description copied from interface: Message
Returns an (eventually empty) array containing the sub messages of this message.

Returns:
an array containing the sub messages of this message.
See Also:
Message.getSubMessages()

getSubMessageTypes

public MessageType[] getSubMessageTypes()
Description copied from interface: MessageType
Returns an (eventually empty) array containing the types of the sub messages of messages of this type.

Returns:
an array containing the types of the sub messages of messages of this type.
See Also:
MessageType.getSubMessageTypes()

getSubMessageTypesIterator

public Iterator getSubMessageTypesIterator()
Description copied from interface: MessageType
Returns an iterator over the types of the sub messages of messages of this type.

Returns:
an iterator over the types of the sub messages of messages of this type.
See Also:
MessageType.getSubMessageTypesIterator()

isSubTypeOf

public boolean isSubTypeOf(MessageType t)
Description copied from interface: MessageType
Returns true if this message type if a sub type of the given message type.

Parameters:
t - a message type
Returns:
true if this message type if a sub type of the given message type.
See Also:
MessageType.isSubTypeOf(MessageType)


Copyright © 2003, 2004 - INRIA Rhone-Alpes - All Rights Reserved.