Class CloseReason

java.lang.Object
io.micronaut.websocket.CloseReason

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

    • 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 Details

    • CloseReason

      public CloseReason(int code, String reason)
      Default constructor.
      Parameters:
      code - The code.
      reason - The reason.
  • Method Details

    • getCode

      public int getCode()
      Returns:
      The code
    • getReason

      public String getReason()
      Returns:
      The reason
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

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

      public String toString()
      Overrides:
      toString in class Object