public enum SocketState extends Enum<SocketState>
ArcusSocket can be in.
The state of a created ArcusSocket can be obtained by calling
ArcusSocket.getState().
If a SocketListener has been added by calling
ArcusSocket.addListener(SocketListener),
SocketListener.error(ArcusSocket, de.ocarthon.libArcus.Error)
will be called when the state of this socket changes
More detailed documentation to the different states can be found in ArcusSocket.
| Enum Constant and Description |
|---|
Closed |
Closing |
Connected |
Connecting |
Error |
Initial |
Listening |
Opening |
| Modifier and Type | Method and Description |
|---|---|
static SocketState |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static SocketState[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SocketState Initial
public static final SocketState Connecting
public static final SocketState Connected
public static final SocketState Opening
public static final SocketState Listening
public static final SocketState Closing
public static final SocketState Closed
public static final SocketState Error
public static SocketState[] values()
for (SocketState c : SocketState.values()) System.out.println(c);
public static SocketState valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2016. All rights reserved.