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. |
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
dataObject
protected java.lang.Object dataObject
- Object that is transported.
ObjectMessage
public ObjectMessage(java.lang.Object sender,
java.lang.Object recipient,
MessageType type,
java.lang.Object obj)
- Constructor.
- Parameters:
sender
- sender of this messagerecipient
- recipient of this messagetype
- type of this messageobj
- object to transport
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
Copyright © 2000-2001 Technical University of Ilmenau, Department ESS