Package madkit.kernel
Enum Class AbstractAgent.State
- All Implemented Interfaces:
Serializable
,Comparable<AbstractAgent.State>
,java.lang.constant.Constable
- Enclosing class:
- AbstractAgent
An agent state. An agent can be in one of the following states:
NOT_LAUNCHED
An agent which has not yet been launched is in this state.INITIALIZING
An agent that has been launched but which has not started itsAbstractAgent.activate()
method yet is in this state.ACTIVATED
An agent that is processing itsAbstractAgent.activate()
method is in this state.LIVING
An agent that is processing itsAgent.live()
method is in this state.ENDING
An agent that is processing itsAbstractAgent.end()
method is in this state.TERMINATED
An agent which has finished its life cycle is in this state.
An agent can be in only one state at a given point in time.
- Since:
- MaDKit 5.0
- Author:
- Fabien Michel
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThe agent is processing itsAbstractAgent.activate()
method.The agent is processing itsAbstractAgent.end()
method.The agent has been launched and is being registered by the kernel but it has not started itsAbstractAgent.activate()
method yet.The agent is processing itsAgent.live()
method.The agent has not been launched yet.The agent has finished its life cycle in the MaDKit platform. -
Method Summary
Modifier and TypeMethodDescriptionstatic AbstractAgent.State
Returns the enum constant of this class with the specified name.static AbstractAgent.State[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NOT_LAUNCHED
The agent has not been launched yet. -
INITIALIZING
The agent has been launched and is being registered by the kernel but it has not started itsAbstractAgent.activate()
method yet. -
ACTIVATED
The agent is processing itsAbstractAgent.activate()
method. This state is also the "running" state ofAbstractAgent
subclasses (i.e. when they have finished their activation) as they do not have aAgent.live()
managed by the kernel in their life cycle. On the contrary toAgent
subclasses which next state isLIVING
). -
LIVING
The agent is processing itsAgent.live()
method. -
ENDING
The agent is processing itsAbstractAgent.end()
method. -
TERMINATED
The agent has finished its life cycle in the MaDKit platform.
-
-
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
-