|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--drm.agentbase.Message
The classtype of a message that agents and bases can send to each other.
Constructor Summary | |
Message(Address sender,
Address recipient,
java.lang.String type)
Constructs a Message using the values of the fields. |
|
Message(Address sender,
Address recipient,
java.lang.String type,
java.lang.Object object)
Constructs a Message using the values of the fields. |
Method Summary | |
byte[] |
getBinary()
The binary content of the message. |
Address |
getRecipient()
The address of the recepient. |
Address |
getSender()
The address of the sender. |
java.lang.String |
getType()
The type of the message. |
void |
setReply(java.lang.Object o)
This method allows the recipient of the message to send a reply object when handling the message. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Message(Address sender, Address recipient, java.lang.String type)
public Message(Address sender, Address recipient, java.lang.String type, java.lang.Object object) throws java.io.IOException
object
- The object to be converted to byte array. If it is null
then no exception is thrown and null is set as binary content.java.io.IOException
- If the conversion of the given object to byte array
is not succesful.Method Detail |
public Address getSender()
public Address getRecipient()
public java.lang.String getType()
public byte[] getBinary()
public void setReply(java.lang.Object o)
The object will undergo a serialization-deserialization procedure, even if the recipient is local, just like in the case of message content. Even though this adds some overhead, the locality/non-locality of an address should normally be transparent and some implementations which send objects that reimplement write/readObject might depend on the actual algorithm of serialization.
IAgent.handleMessage(Message,Object)
,
IBase.fireMessage(Message)
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |