Package io.micronaut.websocket
Class CloseReason
- java.lang.Object
-
- io.micronaut.websocket.CloseReason
-
public class CloseReason extends java.lang.ObjectEnumeration of close events. See https://tools.ietf.org/html/rfc6455#section-11.7.- Since:
- 1.0
-
-
Field Summary
Fields Modifier and Type Field Description static CloseReasonABNORMAL_CLOSURESee https://tools.ietf.org/html/rfc6455#section-11.7.static CloseReasonBAD_GATEWAYSee https://tools.ietf.org/html/rfc6455#section-11.7.static CloseReasonGOING_AWAYSee https://tools.ietf.org/html/rfc6455#section-11.7.static CloseReasonINTERNAL_ERRORSee https://tools.ietf.org/html/rfc6455#section-11.7.static CloseReasonINVALID_FRAME_PAYLOAD_DATASee https://tools.ietf.org/html/rfc6455#section-11.7.static CloseReasonMESSAGE_TO_BIGSee https://tools.ietf.org/html/rfc6455#section-11.7.static CloseReasonMISSING_EXTENSIONSee https://tools.ietf.org/html/rfc6455#section-11.7.static CloseReasonNO_STATUS_RECEIVEDSee https://tools.ietf.org/html/rfc6455#section-11.7.static CloseReasonNORMALSee https://tools.ietf.org/html/rfc6455#section-11.7.static CloseReasonPOLICY_VIOLATIONSee https://tools.ietf.org/html/rfc6455#section-11.7.static CloseReasonPROTOCOL_ERRORSee https://tools.ietf.org/html/rfc6455#section-11.7.static CloseReasonSERVICE_RESTARTSee https://tools.ietf.org/html/rfc6455#section-11.7.static CloseReasonTLS_HANDSHAKESee https://tools.ietf.org/html/rfc6455#section-11.7.static CloseReasonTRY_AGAIN_LATERSee https://tools.ietf.org/html/rfc6455#section-11.7.static CloseReasonUNSUPPORTED_DATASee https://tools.ietf.org/html/rfc6455#section-11.7.
-
Constructor Summary
Constructors Constructor Description CloseReason(int code, java.lang.String reason)Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)intgetCode()java.lang.StringgetReason()inthashCode()java.lang.StringtoString()
-
-
-
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.
-
-
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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-