Enum SessionState

  • All Implemented Interfaces:
    Serializable, Comparable<SessionState>

    public enum SessionState
    extends Enum<SessionState>
    State of the session.

    The following diagram illustrates the state transitions for a session:

    
                         |
                         |
                         |
                         V
           ---------- invalid
          |              |
          |              |creation (authentication OK)
          |              |
          |max login time|
          |destroy       V
          |            valid
          |              |
          |              |
          |              |
          |              | logout
          |              | destroy
          |              | max idle time
          |              | max session time
          |              V
           --------->  destroy
    
     
    • Enum Constant Detail

      • INVALID

        public static final SessionState INVALID
        Marks a session as invalid.

        Sessions start in an INVALID state.

        After successful authentication, sessions can transition to the VALID state; alternatively, if authentication times out, the authentication session will transition to a DESTROYED state.

      • VALID

        public static final SessionState VALID
        Marks a session as valid.

        Sessions can transition to a VALID state from an INVALID state.

        A VALID session can transition to a DESTROYED state when:

        • The session owner requests logout.
        • An administrator requests the session be destroyed.
        • The session times out (max idle time or max session time).
      • DESTROYED

        public static final SessionState DESTROYED
        Marks a session as destroyed.

        Sessions can transition to a DESTROYED state from any other state.

    • Method Detail

      • values

        public static SessionState[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (SessionState c : SessionState.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static SessionState valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
        NullPointerException - if the argument is null