Package org.gnome.soup
Enum Class WebsocketCloseCode
- All Implemented Interfaces:
Enumeration
,Serializable
,Comparable<WebsocketCloseCode>
,Constable
@Generated("io.github.jwharm.JavaGI")
public enum WebsocketCloseCode
extends Enum<WebsocketCloseCode>
implements Enumeration
Pre-defined close codes that can be passed to
WebsocketConnection.close(short, java.lang.String)
or received from
WebsocketConnection.getCloseCode()
.
However, other codes are also allowed.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionreserved value indicating that the connection was closed abnormally; must not be sent.the endpoint received data that was invalid (eg, non-UTF-8 data in a text message).the client/server is going awaythe client is closing the connection because the server failed to negotiate a required extension.reserved value indicating that no close code was present; must not be sent.a normal, non-error closegeneric error code indicating some sort of policy violation.a protocol error occurredthe server is closing the connection because it was unable to fulfill the request.reserved value indicating that the TLS handshake failed; must not be sent.the endpoint received a message that is too big to process.the endpoint received data of a type that it does not support. -
Method Summary
Modifier and TypeMethodDescriptionstatic Type
getType()
Get the GType of the WebsocketCloseCode classint
getValue()
Get the numeric value of this enumstatic WebsocketCloseCode
of
(int value) Create a new WebsocketCloseCode for the provided valuestatic WebsocketCloseCode
Returns the enum constant of this class with the specified name.static WebsocketCloseCode[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NORMAL
a normal, non-error close -
GOING_AWAY
the client/server is going away -
PROTOCOL_ERROR
a protocol error occurred -
UNSUPPORTED_DATA
the endpoint received data of a type that it does not support. -
NO_STATUS
reserved value indicating that no close code was present; must not be sent. -
ABNORMAL
reserved value indicating that the connection was closed abnormally; must not be sent. -
BAD_DATA
the endpoint received data that was invalid (eg, non-UTF-8 data in a text message). -
POLICY_VIOLATION
generic error code indicating some sort of policy violation. -
TOO_BIG
the endpoint received a message that is too big to process. -
NO_EXTENSION
the client is closing the connection because the server failed to negotiate a required extension. -
SERVER_ERROR
the server is closing the connection because it was unable to fulfill the request. -
TLS_HANDSHAKE
reserved value indicating that the TLS handshake failed; must not be sent.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
of
Create a new WebsocketCloseCode for the provided value- Parameters:
value
- the enum value- Returns:
- the enum for the provided value
-
getValue
public int getValue()Get the numeric value of this enum- Specified by:
getValue
in interfaceEnumeration
- Returns:
- the enum value
-
getType
-