org.objectweb.dream.message
Interface MessageType

All Known Subinterfaces:
MessageTypeNC
All Known Implementing Classes:
AbstractExtensibleMessage, AbstractNonExtensibleMessage, BasicExtensibleMessageNC, BasicMessageType, BasicMessageTypeNC

public interface MessageType

A message type is a collection of pairs (name, ChunkType) and sub message types.


Field Summary
static MessageType[] EMPTY_MESSAGE_TYPE_ARRAY
          An empty MessageType array constant.
 
Method Summary
 String[] getChunkNames()
          Returns an (eventually empty) array containing the chunk's names of messages of this type.
 Iterator getChunkNamesIterator()
          Returns an iterator over the chunk's names of messages of this type.
 ChunkType getChunkType(String name)
          Returns a chunk type of this message type from its name.
 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 isEmpty()
          Returns true if this message type is empty (ie : does not contains any chunk types and any sub message types)
 boolean isSubTypeOf(MessageType t)
          Returns true if this message type if a sub type of the given message type.
 

Field Detail

EMPTY_MESSAGE_TYPE_ARRAY

public static final MessageType[] EMPTY_MESSAGE_TYPE_ARRAY
An empty MessageType array constant. This constant should be used by classes requiring an empty MessageType array.

Method Detail

getChunkType

public ChunkType getChunkType(String name)
Returns a chunk type of this message type from its name.

Parameters:
name - the name of one of the chunk types returned by getChunkNames().
Returns:
a chunk type of this message type from its name or null if no chunk with the specified name can be found.

getChunkNames

public String[] getChunkNames()
Returns an (eventually empty) array containing the chunk's names of messages of this type.

Returns:
an array containing the chunk's names of messages of this type.

getChunkNamesIterator

public Iterator getChunkNamesIterator()
Returns an iterator over the chunk's names of messages of this type.

Returns:
an iterator over the chunk's names of messages of this type.

getSubMessageTypes

public MessageType[] getSubMessageTypes()
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.

getSubMessageTypesIterator

public Iterator getSubMessageTypesIterator()
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.

isEmpty

public boolean isEmpty()
Returns true if this message type is empty (ie : does not contains any chunk types and any sub message types)

Returns:
true if this message type is empty

isSubTypeOf

public boolean isSubTypeOf(MessageType t)
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.


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