Package org.mockserver.load
Enum Class LoadScenarioState
- All Implemented Interfaces:
Serializable,Comparable<LoadScenarioState>,Constable
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) --------------+
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionFinished all stages (or reachedmaxRequests) naturally.Registered into the registry, idle, driving no traffic.Triggered to start but waiting outLoadScenario.getStartDelayMillis().Actively driving load (stage clock running).Stopped by an explicit stop request before completing. -
Method Summary
Modifier and TypeMethodDescriptionstatic LoadScenarioStateReturns the enum constant of this class with the specified name.static LoadScenarioState[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
LOADED
Registered into the registry, idle, driving no traffic. -
PENDING
Triggered to start but waiting outLoadScenario.getStartDelayMillis(). -
RUNNING
Actively driving load (stage clock running). -
COMPLETED
Finished all stages (or reachedmaxRequests) naturally. -
STOPPED
Stopped by an explicit stop request before completing.
-
-
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
-