java.io.Serializable
, java.lang.Comparable<ConnectionStatus>
public enum ConnectionStatus extends java.lang.Enum<ConnectionStatus>
Enum Constant | Description |
---|---|
AUDIO_REGION_CHANGE |
Indicates that the audio connection was closed due to the
Region of the
audio connection being changed. |
CONNECTED |
The audio connection has been successfully setup and is ready for use.
|
CONNECTING_ATTEMPTING_UDP_DISCOVERY |
JDA successfully authenticated the audio websocket and it now attempting UDP discovery.
|
CONNECTING_AWAITING_AUTHENTICATION |
JDA has connected the audio websocket to Discord and has sent the authentication information, awaiting reply.
|
CONNECTING_AWAITING_ENDPOINT |
JDA is waiting on Discord to send a valid endpoint which to connect the audio websocket to.
|
CONNECTING_AWAITING_READY |
After determining our external ip and port, JDA forwards this information to Discord so that it can send
audio packets for us to properly receive.
|
CONNECTING_AWAITING_WEBSOCKET_CONNECT |
JDA has received a valid endpoint and is attempting to setup and connect the audio websocket
|
DISCONNECTED_AUTHENTICATION_FAILURE |
Indicates that our token was not valid.
|
DISCONNECTED_CHANNEL_DELETED |
Indicates that the channel which the audio connection was connected to was deleted, thus the connection was severed.
|
DISCONNECTED_LOST_PERMISSION |
Indicates that the logged in account lost the
Permission.VOICE_CONNECT
and cannot connect to the channel. |
DISCONNECTED_REMOVED_DURING_RECONNECT |
Indicates that the logged in account was removed from the
Guild
while reconnecting to the gateway |
DISCONNECTED_REMOVED_FROM_GUILD |
Indicates that the logged in account was removed from the
Guild
that this audio connection was connected to, thus the connection was severed. |
ERROR_CANNOT_RESUME |
Indicates that the audio WebSocket was unable to resume an active session.
|
ERROR_CONNECTION_TIMEOUT |
Occurs when it takes longer than
AudioManager.getConnectTimeout() to establish
the Websocket connection and setup the UDP connection. |
ERROR_LOST_CONNECTION |
Indicates that the connection was lost, either via UDP socket problems or the audio Websocket disconnecting.
|
ERROR_UDP_UNABLE_TO_CONNECT |
Indicates that the UDP setup failed.
|
ERROR_UNSUPPORTED_ENCRYPTION_MODES |
Indicates that the audio WebSocket was unable to complete a handshake with discord, because
discord did not provide any supported encryption modes.
|
ERROR_WEBSOCKET_UNABLE_TO_CONNECT |
Indicates that the audio Websocket was unable to connect to discord.
|
NOT_CONNECTED |
Indicates that there is no open connection or that the connection was closed by choice, not by error.
|
SHUTTING_DOWN |
Indicates that JDA was shutdown and no further connections should be established
|
Modifier and Type | Method | Description |
---|---|---|
boolean |
shouldReconnect() |
|
static ConnectionStatus |
valueOf(java.lang.String name) |
Returns the enum constant of this type with the specified name.
|
static ConnectionStatus[] |
values() |
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ConnectionStatus NOT_CONNECTED
public static final ConnectionStatus SHUTTING_DOWN
public static final ConnectionStatus CONNECTING_AWAITING_ENDPOINT
public static final ConnectionStatus CONNECTING_AWAITING_WEBSOCKET_CONNECT
public static final ConnectionStatus CONNECTING_AWAITING_AUTHENTICATION
public static final ConnectionStatus CONNECTING_ATTEMPTING_UDP_DISCOVERY
public static final ConnectionStatus CONNECTING_AWAITING_READY
public static final ConnectionStatus CONNECTED
public static final ConnectionStatus DISCONNECTED_LOST_PERMISSION
Permission.VOICE_CONNECT
and cannot connect to the channel.public static final ConnectionStatus DISCONNECTED_CHANNEL_DELETED
public static final ConnectionStatus DISCONNECTED_REMOVED_FROM_GUILD
Guild
that this audio connection was connected to, thus the connection was severed.public static final ConnectionStatus DISCONNECTED_REMOVED_DURING_RECONNECT
Guild
while reconnecting to the gatewaypublic static final ConnectionStatus DISCONNECTED_AUTHENTICATION_FAILURE
public static final ConnectionStatus AUDIO_REGION_CHANGE
Region
of the
audio connection being changed. JDA will automatically attempt to reconnect the audio connection regardless
of the value of the AudioManager.isAutoReconnect()
.public static final ConnectionStatus ERROR_LOST_CONNECTION
public static final ConnectionStatus ERROR_CANNOT_RESUME
public static final ConnectionStatus ERROR_WEBSOCKET_UNABLE_TO_CONNECT
public static final ConnectionStatus ERROR_UNSUPPORTED_ENCRYPTION_MODES
public static final ConnectionStatus ERROR_UDP_UNABLE_TO_CONNECT
public static final ConnectionStatus ERROR_CONNECTION_TIMEOUT
AudioManager.getConnectTimeout()
to establish
the Websocket connection and setup the UDP connection.
public static ConnectionStatus[] values()
for (ConnectionStatus c : ConnectionStatus.values()) System.out.println(c);
public static ConnectionStatus valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic boolean shouldReconnect()