Package discord4j.gateway
Enum Class GatewayConnection.State
- All Implemented Interfaces:
Serializable,Comparable<GatewayConnection.State>,Constable
- Enclosing class:
- GatewayConnection
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionPropagated when a connection receives a READY or RESUMED event.Propagated when a disconnection happens and is in the process or releasing its resources.Propagated when a connection is closed but before a retry or stop process is started.Propagated when a connection is being retried and a new session must be established.Propagated when a connection is being retried and the current session can be resumed.Propagated when a brand new connection is in the process of authenticating through IDENTIFY payload.Propagated when a brand new connection is in the process of resuming a session. -
Method Summary
Modifier and TypeMethodDescriptionstatic GatewayConnection.StateReturns the enum constant of this class with the specified name.static GatewayConnection.State[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
START_IDENTIFYING
Propagated when a brand new connection is in the process of authenticating through IDENTIFY payload. -
START_RESUMING
Propagated when a brand new connection is in the process of resuming a session. -
CONNECTED
Propagated when a connection receives a READY or RESUMED event. -
DISCONNECTING
Propagated when a connection is closed but before a retry or stop process is started. -
RESUMING
Propagated when a connection is being retried and the current session can be resumed. -
RECONNECTING
Propagated when a connection is being retried and a new session must be established. -
DISCONNECTED
Propagated when a disconnection happens and is in the process or releasing its resources.
-
-
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
-