Enum Class SessionCloseReason

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

public enum SessionCloseReason extends Enum<SessionCloseReason>
Why a session is closing, carried by SessionEnd (issue #63). Drives operator dashboards and downstream cleanup branching — a CLIENT_DISCONNECT is normal; an ERROR or AUTH_REVOKED warrants attention.
Since:
0.5.0 (issue #63)
  • Enum Constant Details

    • CLIENT_DISCONNECT

      public static final SessionCloseReason CLIENT_DISCONNECT
      Client closed the connection normally.
    • SERVER_SHUTDOWN

      public static final SessionCloseReason SERVER_SHUTDOWN
      Server-initiated shutdown (deploy, drain, scale-down).
    • IDLE_TIMEOUT

      public static final SessionCloseReason IDLE_TIMEOUT
      Idle-timer fired and the policy was to close.
    • AUTH_REVOKED

      public static final SessionCloseReason AUTH_REVOKED
      Auth token was revoked or expired mid-session.
    • ERROR

      public static final SessionCloseReason ERROR
      Unrecoverable error closed the session; cause attached.
  • Method Details

    • values

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