mss.ea.al
Class CollectionMessage
java.lang.Object
|
+--mss.ea.al.AbstractMessage
|
+--mss.ea.al.CollectionMessage
- All Implemented Interfaces:
- Message
- public class CollectionMessage
- extends AbstractMessage
Default implementation of a message transporting a collection of objects.
- Since:
- 0.2
- Version:
- $Revision: 1.3 $ $Date: 2001/11/13 09:57:29 $
- Author:
- Andreas Rummler
Field Summary |
protected java.util.Collection |
dataCollection
Collection of objects that is transported. |
Constructor Summary |
CollectionMessage(java.lang.Object sender,
java.lang.Object recipient,
MessageType type,
java.util.Collection collection)
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 |
dataCollection
protected java.util.Collection dataCollection
- Collection of objects that is transported.
CollectionMessage
public CollectionMessage(java.lang.Object sender,
java.lang.Object recipient,
MessageType type,
java.util.Collection collection)
- Constructor.
- Parameters:
sender
- sender of this messagerecipient
- recipient of this messagetype
- type of this messagecollection
- collection of 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