Class RequestActionMessage

All Implemented Interfaces:
Serializable, Cloneable

public class RequestActionMessage extends StringMessage
A message used to model a request made to an agent to perform an action that corresponds to an internal method call. The message contains the name of the method to call and the parameters to pass to the method.

It is especially used in RequestAgentMessageAction and AgentMethodAction which are mainly designed to be used in a GUI to request an agent to perform an action.

Upon reception of such a message, an agent can use Agent.handleRequestActionMessage(RequestActionMessage) to automatically perform the underlying method call.

See Also:
  • Constructor Details

    • RequestActionMessage

      public RequestActionMessage(String methodName, Object... parameters)
      Builds a new request message with the name of the method to call and the parameters to pass to the method.
      Parameters:
      methodName - the name of the method to call
      parameters - the parameters to pass to the method
  • Method Details

    • getParameters

      public Object[] getParameters()
      Gets the parameters to pass to the method.
      Returns:
      the parameters