Package madkit.action

Enum Class KernelAction

java.lang.Object
java.lang.Enum<KernelAction>
madkit.action.KernelAction
All Implemented Interfaces:
Serializable, Comparable<KernelAction>, java.lang.constant.Constable

public enum KernelAction extends Enum<KernelAction>
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
  • Enum Constant Details

    • EXIT

      public static final KernelAction EXIT
      Close the kernel
    • COPY

      public static final KernelAction COPY
      Clone the kernel with its initial options
    • RESTART

      public static final KernelAction RESTART
      Restart the kernel with its initial options
    • LAUNCH_NETWORK

      public static final KernelAction LAUNCH_NETWORK
      Start the network
    • STOP_NETWORK

      public static final KernelAction STOP_NETWORK
      Stop the network
    • CONSOLE

      public static final KernelAction CONSOLE
      Makes a redirection of the out and err to a MaDKit agent.
    • LAUNCH_AGENT

      public static final KernelAction LAUNCH_AGENT
      Launch an agent
    • LAUNCH_MAS

      public static final KernelAction LAUNCH_MAS
      Launch a MAS configuration
    • LAUNCH_XML

      public static final KernelAction LAUNCH_XML
      Launch an XML configuration
    • KILL_AGENT

      public static final KernelAction KILL_AGENT
      Kill an agent
    • CONNECT_WEB_REPO

      public static final KernelAction CONNECT_WEB_REPO
      Connection to the MaDKit web repository
    • CONNECT_TO_IP

      public static final KernelAction CONNECT_TO_IP
      For connecting kernels in a wide area network. It requires a parameter of type InetAddress.
  • Method Details

    • values

      public static KernelAction[] 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

      public static KernelAction valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getActionFor

      public Action getActionFor(AbstractAgent agent, Object... parameters)
      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 kernel
      parameters - the info
      Returns:
      the new corresponding action
    • getActionInfo

      public ActionInfo getActionInfo()
      Returns:
      the actionInfo