Package madkit.action
Enum Class KernelAction
- All Implemented Interfaces:
Serializable
,Comparable<KernelAction>
,java.lang.constant.Constable
Enum representing kernel actions. This especially could be used to communicate with the kernel in
order to trigger kernel's actions. It could be used by any agent to interact with the kernel by
creating
Action
using getActionFor(AbstractAgent, Object...)
.- Since:
- MaDKit 5.0.0.14
- Version:
- 0.92
- 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 ConstantsEnum ConstantDescriptionFor connecting kernels in a wide area network.Connection to the MaDKit web repositoryMakes a redirection of the out and err to a MaDKit agent.Clone the kernel with its initial optionsClose the kernelKill an agentLaunch an agentLaunch a MAS configurationStart the networkLaunch an XML configurationRestart the kernel with its initial optionsStop the network -
Method Summary
Modifier and TypeMethodDescriptiongetActionFor
(AbstractAgent agent, Object... parameters) Builds an action that will make the kernel do the corresponding operation if possible.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 the kernel -
COPY
Clone the kernel with its initial options -
RESTART
Restart the kernel with its initial options -
LAUNCH_NETWORK
Start the network -
STOP_NETWORK
Stop the network -
CONSOLE
Makes a redirection of the out and err to a MaDKit agent. -
LAUNCH_AGENT
Launch an agent -
LAUNCH_MAS
Launch a MAS configuration -
LAUNCH_XML
Launch an XML configuration -
KILL_AGENT
Kill an agent -
CONNECT_WEB_REPO
Connection to the MaDKit web repository -
CONNECT_TO_IP
For connecting kernels in a wide area network. It requires a parameter of typeInetAddress
.
-
-
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
-
getActionFor
Builds an action that will make the kernel do the corresponding operation if possible.- Parameters:
agent
- the agent that will send the message to the kernelparameters
- the info- Returns:
- the new corresponding action
-
getActionInfo
- Returns:
- the actionInfo
-