org.sape.smfw.message
Class Message

java.lang.Object
  extended byorg.sape.smfw.message.Message
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
CompositeMessage, VoidMessage

public class Message
extends Object
implements Serializable

The base class representing any message between a source and a sink. This class is part of the Message "Composite" pattern.

See Also:
Serialized Form

Field Summary
protected  Message parent
          Reference to my parent
 
Constructor Summary
Message()
          Constructor for Message.
 
Method Summary
 void addChild(Message message)
          Adds the supplied message as a child of this message.
 Message getParent()
          Returns the parent.
 Iterator iterator()
          Returns an iterator on the child messages.
 void setParent(Message parent)
          Sets the parent.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parent

protected Message parent
Reference to my parent

Constructor Detail

Message

public Message()
Constructor for Message.

Method Detail

getParent

public Message getParent()
Returns the parent.

Returns:
Message

setParent

public void setParent(Message parent)
Sets the parent.

Parameters:
parent - The parent to set

addChild

public void addChild(Message message)
Adds the supplied message as a child of this message.

Parameters:
message - the message to be added as a child

iterator

public Iterator iterator()
Returns an iterator on the child messages. Since a Message object has no children, this implementation returns an empty iterator.

Returns:
Iterator on the child messages


Copyright 2003 Sapient Corporation. All Rights Reserved.