Class Message

java.lang.Object
nl.uu.cs.aplib.multiAgentSupport.Message

public class Message extends Object
The class defines the messages that agents send to each other.
Author:
Wish
  • 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

      public Message timestamp()
      Assign a time-stamp to this message.
    • getIdSource

      public String getIdSource()
    • getIdTarget

      public String getIdTarget()
    • getCastTy

      public Message.MsgCastType getCastTy()
    • getTimeStamp

      public Date getTimeStamp()
    • getMsgName

      public String getMsgName()
    • getArgs

      public Object[] getArgs()