|
Agent System POND 1.2 (28.2.2002) | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--PkgAgentSystem.Messaging.BroadcastMessage
A message, which can be sent from one agent to all other local agents (no single recipient).
Subclasses MUST be serializable, else messaging will NOT work!
AgentBase
,
AgentSystem.localBroadcastMessage(AgentBase,BroadcastMessage)
, Serialized FormConstructor Summary | |
protected |
BroadcastMessage()
Create a new and empty message. |
protected |
BroadcastMessage(AgentIdentity sender,
long convTypeID,
long srcConvID)
Creates a new broadcast message from one agent to all others. |
Method Summary | |
BroadcastMessage |
copy()
Returns a shallow copy of this message. |
boolean |
fromInitiator()
Returns whether this message is from the initiator to the other party/parties or an answer. |
AgentIdentity |
getAddressee()
Returns the identity of the recipient of the message. |
long |
getConversationTypeID()
Returns the ID of the type of conversations handling this message. |
long |
getDestConversationID()
Returns the ID of the conversation at the recipient of the message. |
AgentIdentity |
getSender()
Returns the identity of the sender of the message. |
long |
getSrcConversationID()
Returns the ID of the conversation at the sender of the message. |
void |
setAddressee(AgentIdentity addressee)
Set the addressee of the message. |
void |
setConversationTypeID(long id)
Set the type ID for the conversation. |
void |
setDestConversationID(long id)
Set the ID for the conversation at the destination. |
void |
setFromInitiator(boolean fromInitiator)
Sets whether this message is from the initiator to the other party/parties or an answer. |
void |
setSender(AgentIdentity sender)
Set the sender of the message. |
void |
setSrcConversationID(long id)
Set the ID for the conversation at the sender. |
String |
toString()
Returns a string representation of this broadcast-message. |
Methods inherited from class java.lang.Object |
|
Constructor Detail |
protected BroadcastMessage()
protected BroadcastMessage(AgentIdentity sender, long convTypeID, long srcConvID)
sender
- the identity of the sender. Must be provided.convTypeID
- ID of the type of the conversation. Must not be 0.srcConvID
- ID of the conversation at the source. Must not be 0 (broadcasts
may appear only within conversations).Method Detail |
public void setSrcConversationID(long id)
setSrcConversationID
in interface MessageType
id
- the id of the conversation at the sender (may not be 0)public long getSrcConversationID()
getSrcConversationID
in interface MessageType
public void setDestConversationID(long id)
setDestConversationID
in interface MessageType
id
- the id of the conversation at the destination (may not be 0)public long getDestConversationID()
getDestConversationID
in interface MessageType
public boolean fromInitiator()
true
for broadcasts!fromInitiator
in interface MessageType
true
public void setFromInitiator(boolean fromInitiator)
setFromInitiator
in interface MessageType
fromInitiator
- Must always be true
!IllegalArgumentException
- if false
public void setConversationTypeID(long id)
setConversationTypeID
in interface MessageType
id
- the id of the type of the conversation (may not be 0)public long getConversationTypeID()
getConversationTypeID
in interface MessageType
public void setSender(AgentIdentity sender)
setSender
in interface MessageType
sender
- the sender for the message (may not be null)public AgentIdentity getSender()
getSender
in interface MessageType
public void setAddressee(AgentIdentity addressee)
setAddressee
in interface MessageType
sender
- the addressee for the message (may not be null)public AgentIdentity getAddressee()
getAddressee
in interface MessageType
public String toString()
toString
in class Object
public BroadcastMessage copy() throws MessageException
MessageException
- if this message cannot be cloned
|
Agent System POND 1.2 (28.2.2002) | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |