Enum CloseReason

    • Enum Constant Detail

      • NORMAL_CLOSURE

        public static final CloseReason NORMAL_CLOSURE
      • GOING_AWAY

        public static final CloseReason GOING_AWAY
      • PROTOCOL_ERROR

        public static final CloseReason PROTOCOL_ERROR
      • CANNOT_ACCEPT

        public static final CloseReason CANNOT_ACCEPT
      • NO_STATUS_CODE

        public static final CloseReason NO_STATUS_CODE
      • CLOSED_ABNORMALLY

        public static final CloseReason CLOSED_ABNORMALLY
      • NOT_CONSISTENT

        public static final CloseReason NOT_CONSISTENT
      • VIOLATED_POLICY

        public static final CloseReason VIOLATED_POLICY
      • NO_EXTENSION

        public static final CloseReason NO_EXTENSION
      • UNEXPECTED_CONDITION

        public static final CloseReason UNEXPECTED_CONDITION
      • SERVICE_RESTART

        public static final CloseReason SERVICE_RESTART
      • TRY_AGAIN_LATER

        public static final CloseReason TRY_AGAIN_LATER
      • TLS_HANDSHAKE_FAILURE

        public static final CloseReason TLS_HANDSHAKE_FAILURE
    • Field Detail

      • code

        public final int code
      • text

        public final String text
      • mightBeUsedByEndpoint

        public final boolean mightBeUsedByEndpoint
    • Method Detail

      • values

        public static CloseReason[] 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 (CloseReason c : CloseReason.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static CloseReason 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
      • forCloseCode

        public static CloseReason forCloseCode​(int code)