com.taosdata.jdbc.ws

## 类 WSClient

- java.lang.Object
- - org.java_websocket.WebSocketAdapter
  - - org.java_websocket.AbstractWebSocket
    - - org.java_websocket.client.WebSocketClient
      - - com.taosdata.jdbc.ws.WSClient

所有已实现的接口:
  AutoCloseable, Runnable, org.java_websocket.WebSocket, org.java_websocket.WebSocketListener

    public class WSClient
    extends org.java_websocket.client.WebSocketClient
    implements AutoCloseable

### 字段概要

### 从类继承的字段 org.java_websocket.client.WebSocketClient

`uri`

### 构造器概要

构造器
构造器和说明
`WSClient(URI serverUri, String user, String password, String database, InFlightRequest inFlightRequest, Map<String,String> httpHeaders, CountDownLatch latch, int maxRequest)` create websocket connection client

### 方法概要

所有方法 实例方法 具体方法
`void` `addTransport(Transport transport)`
`void` `close()`
`boolean` `isAuth()`
`void` `onClose(int code, String reason, boolean remote)`
`void` `onError(Exception e)`
`void` `onMessage(ByteBuffer bytes)`
`void` `onMessage(String message)`
`void` `onOpen(org.java_websocket.handshake.ServerHandshake serverHandshake)`
`void` `removeTransports(Transport transport)`

### 从类继承的方法 org.java_websocket.client.WebSocketClient

`addHeader, clearHeaders, close, close, closeBlocking, closeConnection, connect, connectBlocking, connectBlocking, getAttachment, getConnection, getConnections, getDraft, getLocalSocketAddress, getLocalSocketAddress, getProtocol, getReadyState, getRemoteSocketAddress, getRemoteSocketAddress, getResourceDescriptor, getSocket, getSSLSession, getURI, hasBufferedData, hasSSLSupport, isClosed, isClosing, isFlushAndClose, isOpen, onCloseInitiated, onClosing, onSetSSLParameters, onWebsocketClose, onWebsocketCloseInitiated, onWebsocketClosing, onWebsocketError, onWebsocketMessage, onWebsocketMessage, onWebsocketOpen, onWriteDemand, reconnect, reconnectBlocking, removeHeader, run, send, send, send, sendFragmentedFrame, sendFrame, sendFrame, sendPing, setAttachment, setDnsResolver, setProxy, setSocket, setSocketFactory`

### 从类继承的方法 org.java_websocket.AbstractWebSocket

`getConnectionLostTimeout, isReuseAddr, isTcpNoDelay, setConnectionLostTimeout, setReuseAddr, setTcpNoDelay, startConnectionLostTimer, stopConnectionLostTimer`

### 从类继承的方法 org.java_websocket.WebSocketAdapter

`onPreparePing, onWebsocketHandshakeReceivedAsClient, onWebsocketHandshakeReceivedAsServer, onWebsocketHandshakeSentAsClient, onWebsocketPing, onWebsocketPong`

### 从类继承的方法 java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### 构造器详细资料

#### WSClient

    public WSClient(URI serverUri,
                    String user,
                    String password,
                    String database,
                    InFlightRequest inFlightRequest,
                    Map<String,String> httpHeaders,
                    CountDownLatch latch,
                    int maxRequest)

create websocket connection client

参数:
  `serverUri` - connection url
  `user` - database user
  `password` - database password
  `database` - connection database

### 方法详细资料

#### removeTransports

    public void removeTransports(Transport transport)

#### addTransport

    public void addTransport(Transport transport)

#### isAuth

    public boolean isAuth()

#### onOpen

    public void onOpen(org.java_websocket.handshake.ServerHandshake serverHandshake)

指定者:
  `onOpen` 在类中 `org.java_websocket.client.WebSocketClient`

#### onMessage

    public void onMessage(String message)

指定者:
  `onMessage` 在类中 `org.java_websocket.client.WebSocketClient`

#### onMessage

    public void onMessage(ByteBuffer bytes)

覆盖:
  `onMessage` 在类中 `org.java_websocket.client.WebSocketClient`

#### onClose

    public void onClose(int code,
                        String reason,
                        boolean remote)

指定者:
  `onClose` 在类中 `org.java_websocket.client.WebSocketClient`

#### onError

    public void onError(Exception e)

指定者:
  `onError` 在类中 `org.java_websocket.client.WebSocketClient`

#### close

    public void close()

指定者:
  `close` 在接口中 `AutoCloseable`
指定者:
  `close` 在接口中 `org.java_websocket.WebSocket`
覆盖:
  `close` 在类中 `org.java_websocket.client.WebSocketClient`