Package com.neovisionaries.ws.client
Enum ThreadType
- java.lang.Object
-
- java.lang.Enum<ThreadType>
-
- com.neovisionaries.ws.client.ThreadType
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<ThreadType>
public enum ThreadType extends java.lang.Enum<ThreadType>
Types of threads which are created internally in the implementation.- Since:
- 2.0
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CONNECT_THREADA thread which callsWebSocket.connect()asynchronously (ConnectThread).FINISH_THREADA thread which does finalization of aWebSocketinstance.READING_THREADA thread which reads WebSocket frames from the server (ReadingThread).WRITING_THREADA thread which sends WebSocket frames to the server (WritingThread).
-
Constructor Summary
Constructors Modifier Constructor Description privateThreadType()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ThreadTypevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static ThreadType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
READING_THREAD
public static final ThreadType READING_THREAD
A thread which reads WebSocket frames from the server (ReadingThread).
-
WRITING_THREAD
public static final ThreadType WRITING_THREAD
A thread which sends WebSocket frames to the server (WritingThread).
-
CONNECT_THREAD
public static final ThreadType CONNECT_THREAD
A thread which callsWebSocket.connect()asynchronously (ConnectThread).
-
FINISH_THREAD
public static final ThreadType FINISH_THREAD
A thread which does finalization of aWebSocketinstance. (FinishThread).
-
-
Method Detail
-
values
public static ThreadType[] 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 (ThreadType c : ThreadType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ThreadType valueOf(java.lang.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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
-