org.opcfoundation.ua.utils.asyncsocket
Enum SocketState

java.lang.Object
  extended by java.lang.Enum<SocketState>
      extended by org.opcfoundation.ua.utils.asyncsocket.SocketState
All Implemented Interfaces:
Serializable, Comparable<SocketState>

public enum SocketState
extends Enum<SocketState>

Socket states. Initial states: Ready Final states: Error, Closed State transitions: Ready -> Connecting -> Connected -> Closed Ready -> Connecting -> Connected -> Error Ready -> Connecting -> Error Ready -> Closed

Author:
Toni Kalajainen (toni.kalajainen@vtt.fi)

Enum Constant Summary
Closed
           
Connected
           
Connecting
           
Error
           
Ready
           
 
Field Summary
static EnumSet<SocketState> CONNECTED_TRANSITION_STATES
           
static EnumSet<SocketState> CONNECTING_TRANSITION_STATES
           
static EnumSet<SocketState> ERROR_STATES
           
static EnumSet<SocketState> FINAL_STATES
           
static EnumSet<SocketState> INITIAL_STATES
           
static EnumSet<SocketState> NON_FINAL_STATES
           
static EnumSet<SocketState> OPEN_STATES
           
 
Method Summary
 boolean isFinal()
           
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.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

Ready

public static final SocketState Ready

Connecting

public static final SocketState Connecting

Connected

public static final SocketState Connected

Error

public static final SocketState Error

Closed

public static final SocketState Closed
Field Detail

OPEN_STATES

public static final EnumSet<SocketState> OPEN_STATES

ERROR_STATES

public static final EnumSet<SocketState> ERROR_STATES

INITIAL_STATES

public static final EnumSet<SocketState> INITIAL_STATES

NON_FINAL_STATES

public static final EnumSet<SocketState> NON_FINAL_STATES

FINAL_STATES

public static final EnumSet<SocketState> FINAL_STATES

CONNECTED_TRANSITION_STATES

public static final EnumSet<SocketState> CONNECTED_TRANSITION_STATES

CONNECTING_TRANSITION_STATES

public static final EnumSet<SocketState> CONNECTING_TRANSITION_STATES
Method Detail

values

public static SocketState[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (SocketState c : SocketState.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static SocketState valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
NullPointerException - if the argument is null

isFinal

public boolean isFinal()


Copyright © 2018. All rights reserved.