eaLib API Docs
Last Modified : January 7 2002

mss.ea.al
Class ObjectMessage

java.lang.Object
  |
  +--mss.ea.al.AbstractMessage
        |
        +--mss.ea.al.ObjectMessage
All Implemented Interfaces:
Message

public class ObjectMessage
extends AbstractMessage

Default implementation of a message transporting a single object.

Since:
0.2
Version:
$Revision: 1.3 $ $Date: 2001/11/13 10:02:14 $
Author:
Andreas Rummler

Field Summary
protected  java.lang.Object dataObject
          Object that is transported.
 
Fields inherited from class mss.ea.al.AbstractMessage
deliverState, ID, recipient, sender, type
 
Constructor Summary
ObjectMessage(java.lang.Object sender, java.lang.Object recipient, MessageType type, java.lang.Object obj)
          Constructor.
 
Method Summary
 java.util.Collection getCollection()
          Gets the transported collection of objects.
 java.lang.Object getObject()
          Gets the transported data object.
 boolean transportsCollection()
          Indicates, if this message transports a collection of objects.
 boolean transportsObject()
          Indicates, if this message transports a single object.
 
Methods inherited from class mss.ea.al.AbstractMessage
getDeliverState, getID, getRecipient, getSender, getType, setDeliverState, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

dataObject

protected java.lang.Object dataObject
Object that is transported.
Constructor Detail

ObjectMessage

public ObjectMessage(java.lang.Object sender,
                     java.lang.Object recipient,
                     MessageType type,
                     java.lang.Object obj)
Constructor.
Parameters:
sender - sender of this message
recipient - recipient of this message
type - type of this message
obj - object to transport
Method Detail

transportsObject

public boolean transportsObject()
Description copied from interface: Message
Indicates, if this message transports a single object.
Following copied from interface: mss.ea.al.Message
Returns:
true, if this message transports an object

transportsCollection

public boolean transportsCollection()
Description copied from interface: Message
Indicates, if this message transports a collection of objects.
Following copied from interface: mss.ea.al.Message
Returns:
true, if this message transports a collection of objects

getObject

public java.lang.Object getObject()
Description copied from interface: Message
Gets the transported data object. This method should return null, if no object is transported.
Following copied from interface: mss.ea.al.Message
Returns:
transported data object

getCollection

public java.util.Collection getCollection()
Description copied from interface: Message
Gets the transported collection of objects. This method should return null, if no collection is transported.
Following copied from interface: mss.ea.al.Message
Returns:
transported collection of objects

eaLib API Docs
Last Modified : January 7 2002

Copyright © 2000-2001 Technical University of Ilmenau, Department ESS