Package discord4j.gateway
Enum GatewayConnection.State
- java.lang.Object
-
- java.lang.Enum<GatewayConnection.State>
-
- discord4j.gateway.GatewayConnection.State
-
- All Implemented Interfaces:
Serializable,Comparable<GatewayConnection.State>
- Enclosing class:
- GatewayConnection
public static enum GatewayConnection.State extends Enum<GatewayConnection.State>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CONNECTEDPropagated when a connection receives a READY or RESUMED event.DISCONNECTEDPropagated when a disconnection happens and is in the process or releasing its resources.DISCONNECTINGPropagated when a connection is closed but before a retry or stop process is started.RECONNECTINGPropagated when a connection is being retried and a new session must be established.RESUMINGPropagated when a connection is being retried and the current session can be resumed.START_IDENTIFYINGPropagated when a brand new connection is in the process of authenticating through IDENTIFY payload.START_RESUMINGPropagated when a brand new connection is in the process of resuming a session.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static GatewayConnection.StatevalueOf(String name)Returns the enum constant of this type with the specified name.static GatewayConnection.State[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
START_IDENTIFYING
public static final GatewayConnection.State START_IDENTIFYING
Propagated when a brand new connection is in the process of authenticating through IDENTIFY payload.
-
START_RESUMING
public static final GatewayConnection.State START_RESUMING
Propagated when a brand new connection is in the process of resuming a session.
-
CONNECTED
public static final GatewayConnection.State CONNECTED
Propagated when a connection receives a READY or RESUMED event.
-
DISCONNECTING
public static final GatewayConnection.State DISCONNECTING
Propagated when a connection is closed but before a retry or stop process is started.
-
RESUMING
public static final GatewayConnection.State RESUMING
Propagated when a connection is being retried and the current session can be resumed.
-
RECONNECTING
public static final GatewayConnection.State RECONNECTING
Propagated when a connection is being retried and a new session must be established.
-
DISCONNECTED
public static final GatewayConnection.State DISCONNECTED
Propagated when a disconnection happens and is in the process or releasing its resources.
-
-
Method Detail
-
values
public static GatewayConnection.State[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (GatewayConnection.State c : GatewayConnection.State.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static GatewayConnection.State valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException- if the argument is null
-
-