public class Message extends Object implements Cloneable, Serializable
AgentAddress
class).AgentAddress
,
AbstractAgent.sendMessage(AgentAddress, Message)
,
AbstractAgent.sendMessage(String, String, String, Message)
,
Serialized FormConstructor and Description |
---|
Message() |
Modifier and Type | Method and Description |
---|---|
protected Message |
clone()
Returns a shadow copy of the message.
|
ConversationID |
getConversationID()
returns the conversation ID for this message.
|
AgentAddress |
getReceiver()
Returns the agent address corresponding to the agent that receive this message.
|
AgentAddress |
getSender()
Returns the agent address corresponding to the agent that sends this message.
|
String |
toString() |
public AgentAddress getReceiver()
public AgentAddress getSender()
null
if the message has not been sent by an agent, but by any other kind
of object.AbstractAgent.sendMessage(AgentAddress, Message)
,
AbstractAgent.sendMessage(String, String, String, Message)
protected Message clone()
AbstractAgent.broadcastMessage(String, String, String, Message)
and the like to set different receivers for
each cloned message.public ConversationID getConversationID()
AbstractAgent.sendReply(Message, Message)
like methods. Especially, if the answer is again used for replying,
the ID will be used again to tag this new answer, and so on.
Fabien Michel, Olivier Gutknecht, Jacques Ferber - February 17 2020