Package nl.uu.cs.aplib.multiAgentSupport
Class Message
java.lang.Object
nl.uu.cs.aplib.multiAgentSupport.Message
The class defines the messages that agents send to each other.
- Author:
- Wish
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Different types ofMessage
: SINGLECASR, ROLECAST, BROADCAST. -
Field Summary
-
Constructor Summary
-
Method Summary
-
Field Details
-
Constructor Details
-
Message
public Message(String idSource, int priority, Message.MsgCastType castType, String idTarget, String msgName, Object... args)Construct a new Message.- Parameters:
idSource
- The id of the sending agent.priority
- The priority of the message. Higher number means higher priority. Currently not used.castType
- Either SINGLECAST, ROLECAST, or BROADCAST.idTarget
- The id of the target agent if the message is SINGLECAST, and the role name if the message is ROLECAST. It is ignored if the message is BROADCAST.msgName
- The 'name' of the message. We leave it unspecified what this represents. E.g. it can be used to identify categories of the messages.args
- The arguments of the message.
-
-
Method Details
-
timestamp
Assign a time-stamp to this message. -
getIdSource
-
getIdTarget
-
getCastTy
-
getTimeStamp
-
getMsgName
-
getArgs
-