Enum Class Agent.ReturnCode
- All Implemented Interfaces:
Serializable
,Comparable<Agent.ReturnCode>
,Constable
- Enclosing class:
Agent
This class enumerates all the return codes which could be obtained with essential
methods of the
Agent
and Agent
classes.- Since:
- MaDKit 5.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionReturned when requesting a role in a secured group failsReturned by launch primitives when the launched agent crashes in activateReturned when usingAgent.createGroup(String, String, boolean, Gatekeeper)
and that a group already existsReturned by kill primitives when the targeted agent is already terminatedReturned when launching an agent which is already launchedReturned when an agent tries to reply to a message which has not been received from another agent, e.g.Returned by send primitives when the targeted agent address does not exist anymore, i.e.Returned by send primitives when the targeted CGR location does not exist or contain any agentIndicates that a community does not existIndicates that a group does not existIndicates that the agent is not in a groupIndicates that a role does not existReturned by kill primitives when the targeted agent has not been launched priorlyReturned when the agent already has the requested roleReturned when the agent does not have a role that it is supposed to have doing a particular action, e.g.Returned on special errors.Indicates that the operation has succeededReturned by various timed primitives of the Agent class likeAgent.sendWaitReply(Message, String, String, String, Integer)
orAgent.launchAgent(Agent, int)
-
Method Summary
Modifier and TypeMethodDescriptionstatic Agent.ReturnCode
Returns the enum constant of this class with the specified name.static Agent.ReturnCode[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SUCCESS
Indicates that the operation has succeeded -
NOT_COMMUNITY
Indicates that a community does not exist -
NOT_GROUP
Indicates that a group does not exist -
NOT_ROLE
Indicates that a role does not exist -
NOT_IN_GROUP
Indicates that the agent is not in a group -
ROLE_ALREADY_HANDLED
Returned when the agent already has the requested role -
ACCESS_DENIED
Returned when requesting a role in a secured group fails -
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
Returned when usingAgent.createGroup(String, String, boolean, Gatekeeper)
and that a group already exists -
ALREADY_LAUNCHED
Returned when launching an agent which is already launched -
TIMEOUT
Returned by various timed primitives of the Agent class likeAgent.sendWaitReply(Message, String, String, String, Integer)
orAgent.launchAgent(Agent, int)
-
AGENT_CRASH
Returned by launch primitives when the launched agent crashes in activate -
NOT_YET_LAUNCHED
Returned by kill primitives when the targeted agent has not been launched priorly -
ALREADY_KILLED
Returned by kill primitives when the targeted agent is already terminated -
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
Returned by send primitives when the targeted CGR location does not exist or contain any agent -
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 usingAgent.receiveMessage(Message)
. -
SEVERE
Returned on special errors. This should not be encountered
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-