Enum Class ConnectionOutcome
- All Implemented Interfaces:
Serializable
,Comparable<ConnectionOutcome>
,Constable
Represents the possible outcomes that may
occur when
Client.connect(String)
is called.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThe client was already connected to the server.The specified ID was already in use by another client.The specified ID did not respectClientHandler.CLIENT_ID_PATTERN
.The connection was successful.The client was not able to reach the server within 5000ms. -
Method Summary
Modifier and TypeMethodDescriptionGets this connection outcome's message.static ConnectionOutcome
Returns the enum constant of this class with the specified name.static ConnectionOutcome[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
SUCCESS
The connection was successful. The client and the server are ready to communicate. -
ALREADY_CONNECTED
The client was already connected to the server. Nothing will happen; the client may communicate with the server. -
ID_ALREADY_IN_USE
The specified ID was already in use by another client. The connection will be terminated and no events will be called. -
INVALID_ID
The specified ID did not respectClientHandler.CLIENT_ID_PATTERN
. The connection will be terminated and no events will be called. -
TIMEOUT
The client was not able to reach the server within 5000ms. The connection will be terminated and no events will be called.
-
-
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
-
getMessage
Gets this connection outcome's message.- Returns:
- Outcome's message
-