public static enum Network.State extends java.lang.Enum<Network.State>
| Enum Constant and Description |
|---|
BLOCKED
State represents that client is being blocked from connecting to network.
|
CONNECTED
State representing that client is connected to network.
|
CONNECTING
State represents that client is trying to connect to a network,
connection is not yet successfully established.
|
CONNECTION_ERROR
State represents there was an error while trying to connect to network.
|
DISCONNECTED
State represents that client is disconnected from network.
|
NETWORK_RESET
State represents networks is either deleted or client was removed from network.
|
NOT_PERMITTED
State represent that client is not permitted to join the network.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
connectionNotPermitted()
A function to check if current state is
NOT_PERMITTED. |
boolean |
isBlocked()
A function to check if current is
BLOCKED. |
boolean |
isConnected()
A function to check if current state is
CONNECTED. |
boolean |
isConnectedOrConnecting()
A function to check if current state is
CONNECTED OR
CONNECTING state. |
boolean |
isConnecting()
A function to check if current state is
CONNECTING. |
boolean |
isEquivalentToDisconnected()
A function to check if current state is equivalent to
DISCONNECTED. |
boolean |
isLeftOrDeleted()
A function to check if current state is equivalent to
NETWORK_RESET. |
boolean |
isLeftOrDeletedOrBlocked()
A function to check if current state of networks is
NETWORK_RESET or
BLOCKED. |
static Network.State |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static Network.State[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Network.State CONNECTED
public static final Network.State CONNECTING
public static final Network.State CONNECTION_ERROR
public static final Network.State NETWORK_RESET
public static final Network.State DISCONNECTED
public static final Network.State BLOCKED
public static final Network.State NOT_PERMITTED
public static Network.State[] values()
for (Network.State c : Network.State.values()) System.out.println(c);
public static Network.State 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 isConnected()
CONNECTED.CONNECTED.public boolean isConnecting()
CONNECTING.CONNECTED.public boolean isConnectedOrConnecting()
CONNECTED OR
CONNECTING state.DISCONNECTED OR
DISCONNECTED.public boolean isEquivalentToDisconnected()
DISCONNECTED.
NOTE: The current state necessarily need not be DISCONNECTED.DISCONNECTED.public boolean isLeftOrDeletedOrBlocked()
NETWORK_RESET or
BLOCKED.public boolean isLeftOrDeleted()
NETWORK_RESET.NETWORK_RESET.public boolean isBlocked()
BLOCKED.BLOCKED.public boolean connectionNotPermitted()
NOT_PERMITTED.NOT_PERMITTED.