Enum Class ContainerState

java.lang.Object
java.lang.Enum<ContainerState>
de.iip_ecosphere.platform.ecsRuntime.ContainerState
All Implemented Interfaces:
Serializable, Comparable<ContainerState>, Constable

public enum ContainerState extends Enum<ContainerState>
Defines container states.
Author:
Holger Eichelberger, SSE
  • Enum Constant Details

  • Field Details

  • Constructor Details

    • ContainerState

      private ContainerState()
  • Method Details

    • values

      public static ContainerState[] 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 ContainerState 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
    • addValidTransition

      private static void addValidTransition(ContainerState source, ContainerState... targets)
      Adds a valid transition. Transitions to FAILED or UNKNOWN are implicitly valid.
      Parameters:
      source - the source state to transition from
      targets - the target state(s) to transition to
    • isValidTransition

      public boolean isValidTransition(ContainerState target)
      Returns whether a transition from this state to target is valid.
      Parameters:
      target - the target state
      Returns:
      true for valid, false else
    • validateTransition

      public static void validateTransition(ContainerState source, ContainerState target) throws ExecutionException
      Validates a container state transition and throws an exception if the transition is invalid.
      Parameters:
      source - the source state
      target - the target state
      Throws:
      ExecutionException - if source is null or a transition from source to target is not valid