public static enum IPCClient.Status extends java.lang.Enum<IPCClient.Status>
IPCClient
can have.Enum Constant and Description |
---|
CLOSED
Status for when the IPCClient has received an
Packet.OpCode.CLOSE . |
CONNECTED
Status for when the IPCClient is connected with Discord.
|
CONNECTING
Status for when the IPCClient is attempting to connect.
|
CREATED
Status for when the IPCClient has been created.
|
DISCONNECTED
Status for when the IPCClient has unexpectedly disconnected, either because
of an exception, and/or due to bad data.
|
Modifier and Type | Method and Description |
---|---|
static IPCClient.Status |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static IPCClient.Status[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final IPCClient.Status CREATED
All IPCClients are created starting with this status, and it never returns for the lifespan of the client.
public static final IPCClient.Status CONNECTING
This will become set whenever the #connect() method is called.
public static final IPCClient.Status CONNECTED
This is only present when the connection is healthy, stable, and reading good
data without exception.
If the environment becomes out of line with these principles in any way, the
IPCClient in question will become DISCONNECTED
.
public static final IPCClient.Status CLOSED
Packet.OpCode.CLOSE
.
This signifies that the reading thread has safely and normally shut and the client is now inactive.
public static final IPCClient.Status DISCONNECTED
When the status of an IPCClient becomes this, a call to
IPCListener.onDisconnect(IPCClient, Throwable)
will be made if one
has been provided to the IPCClient.
Note that the IPCClient will be inactive with this status, after which a call
to IPCClient.connect(DiscordBuild...)
can be made to "reconnect" the
IPCClient.
public static IPCClient.Status[] values()
for (IPCClient.Status c : IPCClient.Status.values()) System.out.println(c);
public static IPCClient.Status 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 null