Class MessageEvent

All Implemented Interfaces:
Serializable, Cloneable

public class MessageEvent extends CGREvent
A message which is sent to agents that have requested a hook on HookMessage.AgentActionEvent.AGENT_STARTED or HookMessage.AgentActionEvent.AGENT_TERMINATED
Since:
MadKit 5.0.0.21
See Also:
  • Constructor Details

  • Method Details

    • getMessage

      public Message getMessage()
      Returns:
      the exchanged message
    • getSourceAgent

      public AgentAddress getSourceAgent()
      Description copied from class: CGREvent
      Returns the address of the agent that did the request.
      Specified by:
      getSourceAgent in class CGREvent
      Returns:
      the name of the agent that triggers the event
    • toString

      public String toString()
      Description copied from class: ObjectMessage
      Returns a string representation of the message.
      Overrides:
      toString in class CGREvent
      Returns:
      a string representation of the message
      See Also: