Enum Class SocketCloseReason
- All Implemented Interfaces:
Serializable
,Comparable<SocketCloseReason>
,Constable
The reasons for closing the eventsub websocket connection.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionYou must respond to ping messages with a pong message.Sending outgoing messages to the server is prohibited with the exception of pong messages.When you connect to the server, you must create a subscription within 10 seconds or the connection is closed.Indicates a problem with the server (similar to an HTTP 500 status code).The reconnect URL is invalid.Transient network error.Transient network timeout.When you receive a session_reconnect message, you have 30 seconds to reconnect to the server and close the old connection. -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
getCode()
static SocketCloseReason
Returns the enum constant of this class with the specified name.static SocketCloseReason[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INTERNAL_SERVER_ERROR
Indicates a problem with the server (similar to an HTTP 500 status code). -
CLIENT_SENT_INBOUND_TRAFFIC
Sending outgoing messages to the server is prohibited with the exception of pong messages. -
CLIENT_FAILED_PING_PONG
You must respond to ping messages with a pong message. -
CONNECTION_UNUSED
When you connect to the server, you must create a subscription within 10 seconds or the connection is closed. The time limit is subject to change. -
RECONNECT_GRACE_TIME_EXPIRED
When you receive a session_reconnect message, you have 30 seconds to reconnect to the server and close the old connection. -
NETWORK_TIMEOUT
Transient network timeout. -
NETWORK_ERROR
Transient network error. -
INVALID_RECONNECT
The reconnect URL is invalid.
-
-
Field Details
-
MAPPINGS
-
-
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
-
getCode
public int getCode()
-