com.taosdata.jdbc.ws

## Class Transport

- java.lang.Object
- - com.taosdata.jdbc.ws.Transport

All Implemented Interfaces:
  AutoCloseable

    public class Transport
    extends Object
    implements AutoCloseable

send message

### Field Summary

Fields
`static int` `DEFAULT_MESSAGE_WAIT_TIMEOUT`
`static byte[]` `EMPTY_BYTE_ARRAY`
`static int` `TSDB_CODE_RPC_NETWORK_UNAVAIL`
`static int` `TSDB_CODE_RPC_SOMENODE_NOT_CONNECTED`

### Constructor Summary

Constructors
`protected` `Transport()`
`` `Transport(WSFunction function, ConnectionParam param, InFlightRequest inFlightRequest)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `checkConnection(int connectTimeout)`
`void` `close()`
`void` `disconnectAndReconnect()`
`boolean` `doReconnectCurNode()`
`ConnectionParam` `getConnectionParam()`
`int` `getReconnectCount()`
`boolean` `isClosed()`
`boolean` `isConnected()`
`boolean` `isConnectionLost()`
`boolean` `reconnectCurNode()`
`Response` `send(Request request)`
`Response` `send(String action, long reqId, io.netty.buffer.ByteBuf buffer)`
`Response` `send(String action, long reqId, long resultId, long type, byte[] rawData)`
`Response` `send(String action, long reqId, long resultId, long type, byte[] rawData, byte[] rawData2)`
`void` `sendFetchBlockAsync(long reqId, long resultId)`
`void` `sendWithoutResponse(Request request)`
`Response` `sendWithoutRetry(Request request)`
`void` `setTimeout(long timeout)`
`void` `shutdown()`

### Methods inherited from class java.lang.Object

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

### Field Detail

#### DEFAULT_MESSAGE_WAIT_TIMEOUT

    public static final int DEFAULT_MESSAGE_WAIT_TIMEOUT

See Also:
  Constant Field Values

#### TSDB_CODE_RPC_NETWORK_UNAVAIL

    public static final int TSDB_CODE_RPC_NETWORK_UNAVAIL

See Also:
  Constant Field Values

#### TSDB_CODE_RPC_SOMENODE_NOT_CONNECTED

    public static final int TSDB_CODE_RPC_SOMENODE_NOT_CONNECTED

See Also:
  Constant Field Values

#### EMPTY_BYTE_ARRAY

    public static final byte[] EMPTY_BYTE_ARRAY

### Constructor Detail

#### Transport

    protected Transport()

#### Transport

    public Transport(WSFunction function,
                     ConnectionParam param,
                     InFlightRequest inFlightRequest)
              throws SQLException

Throws:
  `SQLException`

### Method Detail

#### setTimeout

    public void setTimeout(long timeout)

#### send

    public Response send(Request request)
                  throws SQLException

Throws:
  `SQLException`

#### send

    public Response send(String action,
                         long reqId,
                         long resultId,
                         long type,
                         byte[] rawData)
                  throws SQLException

Throws:
  `SQLException`

#### send

    public Response send(String action,
                         long reqId,
                         long resultId,
                         long type,
                         byte[] rawData,
                         byte[] rawData2)
                  throws SQLException

Throws:
  `SQLException`

#### sendFetchBlockAsync

    public void sendFetchBlockAsync(long reqId,
                                    long resultId)
                             throws SQLException

Throws:
  `SQLException`

#### send

    public Response send(String action,
                         long reqId,
                         io.netty.buffer.ByteBuf buffer)
                  throws SQLException

Throws:
  `SQLException`

#### sendWithoutRetry

    public Response sendWithoutRetry(Request request)
                              throws SQLException

Throws:
  `SQLException`

#### sendWithoutResponse

    public void sendWithoutResponse(Request request)
                             throws SQLException

Throws:
  `SQLException`

#### isClosed

    public boolean isClosed()

#### isConnectionLost

    public boolean isConnectionLost()

#### disconnectAndReconnect

    public void disconnectAndReconnect()
                                throws SQLException

Throws:
  `SQLException`

#### close

    public void close()

Specified by:
  `close` in interface `AutoCloseable`

#### checkConnection

    public void checkConnection(int connectTimeout)
                         throws SQLException

Throws:
  `SQLException`

#### shutdown

    public void shutdown()

#### doReconnectCurNode

    public boolean doReconnectCurNode()
                               throws SQLException

Throws:
  `SQLException`

#### reconnectCurNode

    public boolean reconnectCurNode()
                             throws SQLException

Throws:
  `SQLException`

#### getReconnectCount

    public int getReconnectCount()

#### isConnected

    public boolean isConnected()

#### getConnectionParam

    public final ConnectionParam getConnectionParam()