Class CloseReason


  • public class CloseReason
    extends java.lang.Object
    Enumeration of close events. See https://tools.ietf.org/html/rfc6455#section-11.7.
    Since:
    1.0
    • Field Detail

      • NORMAL

        public static final CloseReason NORMAL
        See https://tools.ietf.org/html/rfc6455#section-11.7.
      • GOING_AWAY

        public static final CloseReason GOING_AWAY
        See https://tools.ietf.org/html/rfc6455#section-11.7.
      • PROTOCOL_ERROR

        public static final CloseReason PROTOCOL_ERROR
        See https://tools.ietf.org/html/rfc6455#section-11.7.
      • UNSUPPORTED_DATA

        public static final CloseReason UNSUPPORTED_DATA
        See https://tools.ietf.org/html/rfc6455#section-11.7.
      • NO_STATUS_RECEIVED

        public static final CloseReason NO_STATUS_RECEIVED
        See https://tools.ietf.org/html/rfc6455#section-11.7.
      • ABNORMAL_CLOSURE

        public static final CloseReason ABNORMAL_CLOSURE
        See https://tools.ietf.org/html/rfc6455#section-11.7.
      • INVALID_FRAME_PAYLOAD_DATA

        public static final CloseReason INVALID_FRAME_PAYLOAD_DATA
        See https://tools.ietf.org/html/rfc6455#section-11.7.
      • POLICY_VIOLATION

        public static final CloseReason POLICY_VIOLATION
        See https://tools.ietf.org/html/rfc6455#section-11.7.
      • MESSAGE_TO_BIG

        public static final CloseReason MESSAGE_TO_BIG
        See https://tools.ietf.org/html/rfc6455#section-11.7.
      • MISSING_EXTENSION

        public static final CloseReason MISSING_EXTENSION
        See https://tools.ietf.org/html/rfc6455#section-11.7.
      • INTERNAL_ERROR

        public static final CloseReason INTERNAL_ERROR
        See https://tools.ietf.org/html/rfc6455#section-11.7.
      • SERVICE_RESTART

        public static final CloseReason SERVICE_RESTART
        See https://tools.ietf.org/html/rfc6455#section-11.7.
      • TRY_AGAIN_LATER

        public static final CloseReason TRY_AGAIN_LATER
        See https://tools.ietf.org/html/rfc6455#section-11.7.
      • BAD_GATEWAY

        public static final CloseReason BAD_GATEWAY
        See https://tools.ietf.org/html/rfc6455#section-11.7.
      • TLS_HANDSHAKE

        public static final CloseReason TLS_HANDSHAKE
        See https://tools.ietf.org/html/rfc6455#section-11.7.
    • Constructor Detail

      • CloseReason

        public CloseReason​(int code,
                           java.lang.String reason)
        Default constructor.
        Parameters:
        code - The code.
        reason - The reason.
    • Method Detail

      • getCode

        public int getCode()
        Returns:
        The code
      • getReason

        public java.lang.String getReason()
        Returns:
        The reason
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object