Enum Class StopReason

java.lang.Object
java.lang.Enum<StopReason>
com.tnsai.hooks.events.StopReason
All Implemented Interfaces:
Serializable, Comparable<StopReason>, Constable

public enum StopReason extends Enum<StopReason>
Why an agent is shutting down, carried by AgentStop (issue #60).
Since:
0.5.0 (issue #60)
  • Enum Constant Details

    • GRACEFUL

      public static final StopReason GRACEFUL
      Normal shutdown — caller invoked agent.stop() / close().
    • CRASHED

      public static final StopReason CRASHED
      Agent crashed; a throwable is attached to the AgentStop.
    • TIMEOUT

      public static final StopReason TIMEOUT
      Watchdog / supervisor terminated the agent after an idle / deadline timeout.
    • USER_ABORTED

      public static final StopReason USER_ABORTED
      User aborted mid-operation (Ctrl-C, cancel button, API abort).
  • Method Details

    • values

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