Enum Class KernelAction
- All Implemented Interfaces:
Serializable
,Comparable<KernelAction>
,Constable
Enum representing kernel actions. This especially could be used to communicate with the
kernel in order to trigger kernel's actions.
- Since:
- MaDKit 5.0.0.14
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionClone the MaDKit session with its initial optionsClose this MaDKit sessionKill an agentLaunch an agentRestart MaDKit with its initial options -
Method Summary
Modifier and TypeMethodDescriptionnewActionFor
(Agent agent, Object... parameters) Returns the action associated with this enum constant for the specified agent, and with the specified parameters.void
Sends a message to the kernel to perform the action associated with this enum constant, with the specified parameters.static KernelAction
Returns the enum constant of this class with the specified name.static KernelAction[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
EXIT
Close this MaDKit session -
COPY
Clone the MaDKit session with its initial options -
RESTART
Restart MaDKit with its initial options -
LAUNCH_AGENT
Launch an agent -
KILL_AGENT
Kill an agent
-
-
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
-
newActionFor
Returns the action associated with this enum constant for the specified agent, and with the specified parameters.- Parameters:
agent
- the agent that will perform the actionparameters
- the parameters to be used by the action- Returns:
- an action that can be used to perform the action
-
request
-