Enum Class LoadScenarioState

java.lang.Object
java.lang.Enum<LoadScenarioState>
org.mockserver.load.LoadScenarioState
All Implemented Interfaces:
Serializable, Comparable<LoadScenarioState>, Constable

public enum LoadScenarioState extends Enum<LoadScenarioState>
Lifecycle state of a registered load scenario in the load-scenario registry.

A scenario is first loaded (registered) into the registry — it is idle and drives no traffic. It is then triggered by name to start. If it has a positive startDelayMillis it sits in PENDING until the delay elapses, then runs; otherwise it runs immediately. When it finishes naturally it is COMPLETED; when stopped by an operator it is STOPPED. A scenario can be re-triggered from any terminal state and re-runs from the start.

   LOADED --trigger--> PENDING --delay elapsed--> RUNNING --finish--> COMPLETED
      ^                   |                          |
      |                   +--------- stop -----------+--> STOPPED
      +---------------------------- (re-trigger) --------------+
 
  • Enum Constant Details

  • Method Details

    • values

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