public static enum AbstractAgent.State extends Enum<AbstractAgent.State>
NOT_LAUNCHED
INITIALIZING
AbstractAgent.activate()
method yet is in this state.ACTIVATED
AbstractAgent.activate()
method is in this state.LIVING
Agent.live()
method is in this state.ENDING
AbstractAgent.end()
method is in this state.TERMINATED
An agent can be in only one state at a given point in time.
AbstractAgent.getState()
Enum Constant and Description |
---|
ACTIVATED
The agent is processing its
AbstractAgent.activate() method. |
ENDING
The agent is processing its
AbstractAgent.end() method. |
INITIALIZING
The agent has been launched and is being registered by the kernel but it has not started its
AbstractAgent.activate()
method yet. |
LIVING
The agent is processing its
Agent.live() method. |
NOT_LAUNCHED
The agent has not been launched yet.
|
TERMINATED
The agent has finished its life cycle in the MaDKit platform.
|
Modifier and Type | Method and Description |
---|---|
static AbstractAgent.State |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static AbstractAgent.State[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final AbstractAgent.State NOT_LAUNCHED
public static final AbstractAgent.State INITIALIZING
AbstractAgent.activate()
method yet.public static final AbstractAgent.State ACTIVATED
AbstractAgent.activate()
method. This state is also the "running" state of
AbstractAgent
subclasses (i.e. when they have finished their activation) as they do not have a
Agent.live()
managed by the kernel in their life cycle. On the contrary to Agent
subclasses which
next state is LIVING
).public static final AbstractAgent.State LIVING
Agent.live()
method.public static final AbstractAgent.State ENDING
AbstractAgent.end()
method.public static final AbstractAgent.State TERMINATED
public static AbstractAgent.State[] values()
for (AbstractAgent.State c : AbstractAgent.State.values()) System.out.println(c);
public static AbstractAgent.State 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 null
Fabien Michel, Olivier Gutknecht, Jacques Ferber - February 17 2020