Package madkit.kernel
Enum Class AbstractAgent.ReturnCode
- All Implemented Interfaces:
Serializable
,Comparable<AbstractAgent.ReturnCode>
,java.lang.constant.Constable
- Enclosing class:
- AbstractAgent
This class enumerates all the return codes which could be obtained with
essential methods of the
AbstractAgent
and Agent
classes.- Since:
- MaDKit 5.0
- Author:
- Fabien Michel
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionReturned when requesting a role in a secured group failsReturned by launch primitives when the launched agent crashes in activateReturned when usingAbstractAgent.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. newly created or sent directly by an object usingAbstractAgent.receiveMessage(Message)
.Returned whenAbstractAgent.requestRole(String, String, String, Object)
orAbstractAgent.createGroup(String, String, boolean, Gatekeeper)
is used in activate and that the agent has been launched usingAbstractAgent.launchAgentBucket(List, String...)
orAbstractAgent.launchAgentBucket(String, int, String...)
Returned by send primitives when the targeted agent address does not exist anymore, i.e. the related agent has leaved the corresponding roleReturned 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.Returned by various timed primitives of the Agent class likeAgent.sendMessageAndWaitForReply(AgentAddress, Message)
orAbstractAgent.launchAgent(AbstractAgent, int, boolean)
-
Method Summary
Modifier and TypeMethodDescriptiontoString()
static AbstractAgent.ReturnCode
Returns the enum constant of this class with the specified name.static AbstractAgent.ReturnCode[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SUCCESS
-
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.AbstractAgent.sendMessageWithRole(AgentAddress, Message, String)
-
ALREADY_GROUP
Returned when usingAbstractAgent.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.sendMessageAndWaitForReply(AgentAddress, Message)
orAbstractAgent.launchAgent(AbstractAgent, int, boolean)
-
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 -
IGNORED
Returned whenAbstractAgent.requestRole(String, String, String, Object)
orAbstractAgent.createGroup(String, String, boolean, Gatekeeper)
is used in activate and that the agent has been launched usingAbstractAgent.launchAgentBucket(List, String...)
orAbstractAgent.launchAgentBucket(String, int, String...)
-
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 usingAbstractAgent.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
-
toString
- Overrides:
toString
in classEnum<AbstractAgent.ReturnCode>
-