Enum Class Agent.ReturnCode

java.lang.Object
java.lang.Enum<Agent.ReturnCode>
madkit.kernel.Agent.ReturnCode
All Implemented Interfaces:
Serializable, Comparable<Agent.ReturnCode>, Constable
Enclosing class:
Agent

public static enum Agent.ReturnCode extends Enum<Agent.ReturnCode>
This class enumerates all the return codes which could be obtained with essential methods of the Agent and Agent classes.
Since:
MaDKit 5.0
  • Enum Constant Details

    • SUCCESS

      public static final Agent.ReturnCode SUCCESS
      Indicates that the operation has succeeded
    • NOT_COMMUNITY

      public static final Agent.ReturnCode NOT_COMMUNITY
      Indicates that a community does not exist
    • NOT_GROUP

      public static final Agent.ReturnCode NOT_GROUP
      Indicates that a group does not exist
    • NOT_ROLE

      public static final Agent.ReturnCode NOT_ROLE
      Indicates that a role does not exist
    • NOT_IN_GROUP

      public static final Agent.ReturnCode NOT_IN_GROUP
      Indicates that the agent is not in a group
    • ROLE_ALREADY_HANDLED

      public static final Agent.ReturnCode ROLE_ALREADY_HANDLED
      Returned when the agent already has the requested role
    • ACCESS_DENIED

      public static final Agent.ReturnCode ACCESS_DENIED
      Returned when requesting a role in a secured group fails
    • ROLE_NOT_HANDLED

      public static final Agent.ReturnCode ROLE_NOT_HANDLED
      Returned when the agent does not have a role that it is supposed to have doing a particular action, e.g. Agent.sendWithRole(Message, AgentAddress, String)
    • ALREADY_GROUP

      public static final Agent.ReturnCode ALREADY_GROUP
      Returned when using Agent.createGroup(String, String, boolean, Gatekeeper) and that a group already exists
    • ALREADY_LAUNCHED

      public static final Agent.ReturnCode ALREADY_LAUNCHED
      Returned when launching an agent which is already launched
    • TIMEOUT

      public static final Agent.ReturnCode TIMEOUT
      Returned by various timed primitives of the Agent class like Agent.sendWaitReply(Message, String, String, String, Integer) or Agent.launchAgent(Agent, int)
    • AGENT_CRASH

      public static final Agent.ReturnCode AGENT_CRASH
      Returned by launch primitives when the launched agent crashes in activate
    • NOT_YET_LAUNCHED

      public static final Agent.ReturnCode NOT_YET_LAUNCHED
      Returned by kill primitives when the targeted agent has not been launched priorly
    • ALREADY_KILLED

      public static final Agent.ReturnCode ALREADY_KILLED
      Returned by kill primitives when the targeted agent is already terminated
    • INVALID_AGENT_ADDRESS

      public static final Agent.ReturnCode INVALID_AGENT_ADDRESS
      Returned by send primitives when the targeted agent address does not exist anymore, i.e. the related agent has leaved the corresponding role
    • NO_RECIPIENT_FOUND

      public static final Agent.ReturnCode NO_RECIPIENT_FOUND
      Returned by send primitives when the targeted CGR location does not exist or contain any agent
    • CANT_REPLY

      public static final Agent.ReturnCode CANT_REPLY
      Returned when an agent tries to reply to a message which has not been received from another agent, e.g. newly created or sent directly by an object using Agent.receiveMessage(Message).
    • SEVERE

      public static final Agent.ReturnCode SEVERE
      Returned on special errors. This should not be encountered
  • Method Details

    • values

      public static Agent.ReturnCode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Agent.ReturnCode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null