001/*
002 * Copyright (C) 2017 Neo Visionaries Inc.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 *     http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016package NeoVisionaries.WebSockets;
017
018
019/**
020 * Types of threads which are created internally in the implementation.
021 * 
022 * <EMBED CLASS='external-html' DATA-FILE-ID=LICENSE>
023 *
024 * @since 2.0
025 */
026public enum ThreadType
027{
028    /**
029     * A thread which reads WebSocket frames from the server
030     * (<code><a href='https://github.com/TakahikoKawasaki/nv-websocket-client/blob/master/src/main/java/com/neovisionaries/ws/client/ReadingThread.java'>ReadingThread</a></code>).
031     */
032    READING_THREAD,
033
034
035    /**
036     * A thread which sends WebSocket frames to the server
037     * (<code><a href='https://github.com/TakahikoKawasaki/nv-websocket-client/blob/master/src/main/java/com/neovisionaries/ws/client/WritingThread.java'>WritingThread</a></code>).
038     */
039    WRITING_THREAD,
040
041
042    /**
043     * A thread which calls {@link WebSocket#connect()} asynchronously
044     * (<code><a href='https://github.com/TakahikoKawasaki/nv-websocket-client/blob/master/src/main/java/com/neovisionaries/ws/client/ConnectThread.java'>ConnectThread</a></code>).
045     */
046    CONNECT_THREAD,
047
048
049    /**
050     * A thread which does finalization of a {@link WebSocket} instance.
051     * (<code><a href='https://github.com/TakahikoKawasaki/nv-websocket-client/blob/master/src/main/java/com/neovisionaries/ws/client/FinishThread.java'>FinishThread</a></code>).
052     */
053    FINISH_THREAD,
054}