public static enum AbstractAgent.ReturnCode extends Enum<AbstractAgent.ReturnCode>
AbstractAgent
and Agent
classes.Enum Constant and Description |
---|
ACCESS_DENIED
Returned when requesting a role in a secured group fails
|
AGENT_CRASH
Returned by launch primitives when the launched agent
crashes in activate
|
ALREADY_GROUP
Returned when using
AbstractAgent.createGroup(String, String, boolean, Gatekeeper)
and that a group already exists |
ALREADY_KILLED
Returned by kill primitives when the targeted
agent is already terminated
|
ALREADY_LAUNCHED
Returned when launching an agent which is already launched
|
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
AbstractAgent.receiveMessage(Message) . |
IGNORED
Returned when
AbstractAgent.requestRole(String, String, String, Object) or
AbstractAgent.createGroup(String, String, boolean, Gatekeeper)
is used in activate and that the agent has been launched using
AbstractAgent.launchAgentBucket(List, String...) or
AbstractAgent.launchAgentBucket(String, int, String...) |
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
|
NOT_COMMUNITY
Indicates that a community does not exist
|
NOT_GROUP
Indicates that a group does not exist
|
NOT_IN_GROUP
Indicates that the agent is not in a group
|
NOT_ROLE
Indicates that a role does not exist
|
NOT_YET_LAUNCHED
Returned by kill primitives when the targeted
agent has not been launched priorly
|
ROLE_ALREADY_HANDLED
Returned when the agent already has the requested role
|
ROLE_NOT_HANDLED
Returned when the agent does not have
a role that it is supposed to have doing a
particular action, e.g.
|
SEVERE
Returned on special errors.
|
SUCCESS |
TIMEOUT
Returned by various timed primitives of the Agent class like
Agent.sendMessageAndWaitForReply(AgentAddress, Message) or
AbstractAgent.launchAgent(AbstractAgent, int, boolean) |
Modifier and Type | Method and Description |
---|---|
String |
toString() |
static AbstractAgent.ReturnCode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static AbstractAgent.ReturnCode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final AbstractAgent.ReturnCode SUCCESS
public static final AbstractAgent.ReturnCode NOT_COMMUNITY
public static final AbstractAgent.ReturnCode NOT_GROUP
public static final AbstractAgent.ReturnCode NOT_ROLE
public static final AbstractAgent.ReturnCode NOT_IN_GROUP
public static final AbstractAgent.ReturnCode ROLE_ALREADY_HANDLED
public static final AbstractAgent.ReturnCode ACCESS_DENIED
public static final AbstractAgent.ReturnCode ROLE_NOT_HANDLED
AbstractAgent.sendMessageWithRole(AgentAddress, Message, String)
public static final AbstractAgent.ReturnCode ALREADY_GROUP
AbstractAgent.createGroup(String, String, boolean, Gatekeeper)
and that a group already existspublic static final AbstractAgent.ReturnCode ALREADY_LAUNCHED
public static final AbstractAgent.ReturnCode TIMEOUT
Agent.sendMessageAndWaitForReply(AgentAddress, Message)
or
AbstractAgent.launchAgent(AbstractAgent, int, boolean)
public static final AbstractAgent.ReturnCode AGENT_CRASH
public static final AbstractAgent.ReturnCode NOT_YET_LAUNCHED
public static final AbstractAgent.ReturnCode ALREADY_KILLED
public static final AbstractAgent.ReturnCode INVALID_AGENT_ADDRESS
public static final AbstractAgent.ReturnCode NO_RECIPIENT_FOUND
public static final AbstractAgent.ReturnCode IGNORED
AbstractAgent.requestRole(String, String, String, Object)
or
AbstractAgent.createGroup(String, String, boolean, Gatekeeper)
is used in activate and that the agent has been launched using
AbstractAgent.launchAgentBucket(List, String...)
or
AbstractAgent.launchAgentBucket(String, int, String...)
public static final AbstractAgent.ReturnCode CANT_REPLY
AbstractAgent.receiveMessage(Message)
.public static final AbstractAgent.ReturnCode SEVERE
public static AbstractAgent.ReturnCode[] values()
for (AbstractAgent.ReturnCode c : AbstractAgent.ReturnCode.values()) System.out.println(c);
public static AbstractAgent.ReturnCode valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant
with the specified nameNullPointerException
- if the argument is nullpublic String toString()
toString
in class Enum<AbstractAgent.ReturnCode>
Fabien Michel, Olivier Gutknecht, Jacques Ferber