Enum Class WebsocketConnectionState
java.lang.Object
java.lang.Enum<WebsocketConnectionState>
com.github.twitch4j.client.websocket.domain.WebsocketConnectionState
- All Implemented Interfaces:
Serializable
,Comparable<WebsocketConnectionState>
,Constable
The state of a
WebsocketConnection
.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThe websocket has established a connection after completing the connection handshake procedure.The websocket has started its connection procedure after a call toWebsocketConnection.connect()
.The websocket is (deliberately) fully disconnected.The websocket is in the process of disconnecting after a call toWebsocketConnection.disconnect()
.The websocket inadvertently lost connection.The websocket has started its reconnection procedure after a call toWebsocketConnection.reconnect()
. -
Method Summary
Modifier and TypeMethodDescriptionstatic WebsocketConnectionState
Returns the enum constant of this class with the specified name.static WebsocketConnectionState[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DISCONNECTING
The websocket is in the process of disconnecting after a call toWebsocketConnection.disconnect()
. -
RECONNECTING
The websocket has started its reconnection procedure after a call toWebsocketConnection.reconnect()
. -
DISCONNECTED
The websocket is (deliberately) fully disconnected.This state will eventually be set after a call to
WebsocketConnection.disconnect()
. This is also the initial state upon creation ofWebsocketConnection
. -
CONNECTING
The websocket has started its connection procedure after a call toWebsocketConnection.connect()
. -
CONNECTED
The websocket has established a connection after completing the connection handshake procedure. -
LOST
The websocket inadvertently lost connection.This could occur for a variety of reasons including: network issues, firewall changes, or even a server-side crash.
-
-
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
-