Package com.tnsai.hooks.events
Enum Class StopReason
- All Implemented Interfaces:
Serializable,Comparable<StopReason>,Constable
Why an agent is shutting down, carried by
AgentStop
(issue #60).- Since:
- 0.5.0 (issue #60)
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAgent crashed; a throwable is attached to theAgentStop.Normal shutdown — caller invokedagent.stop()/close().Watchdog / supervisor terminated the agent after an idle / deadline timeout.User aborted mid-operation (Ctrl-C, cancel button, API abort). -
Method Summary
Modifier and TypeMethodDescriptionstatic StopReasonReturns the enum constant of this class with the specified name.static StopReason[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
GRACEFUL
Normal shutdown — caller invokedagent.stop()/close(). -
CRASHED
Agent crashed; a throwable is attached to theAgentStop. -
TIMEOUT
Watchdog / supervisor terminated the agent after an idle / deadline timeout. -
USER_ABORTED
User aborted mid-operation (Ctrl-C, cancel button, API abort).
-
-
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
-