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`

### Constructor Summary

Constructors
Constructor and Description
`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()`
`boolean` `isClosed()`
`boolean` `isConnectionLost()`
`boolean` `reconnectCurNode()`
`Response` `send(Request request)`
`Response` `send(String action, long reqId, long stmtId, long type, byte[] rawData)`
`void` `sendWithoutRep(Request request)`
`Response` `sendWithoutRetry(Request request)`
`void` `setBinaryMessageHandler(Consumer<ByteBuffer> binaryMessageHandler)`
`void` `setTextMessageHandler(Consumer<String> textMessageHandler)`
`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

### Constructor Detail

#### Transport

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

Throws:
  `SQLException`

### Method Detail

#### setTextMessageHandler

    public void setTextMessageHandler(Consumer<String> textMessageHandler)

#### setBinaryMessageHandler

    public void setBinaryMessageHandler(Consumer<ByteBuffer> binaryMessageHandler)

#### 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 stmtId,
                         long type,
                         byte[] rawData)
                  throws SQLException

Throws:
  `SQLException`

#### sendWithoutRetry

    public Response sendWithoutRetry(Request request)
                              throws SQLException

Throws:
  `SQLException`

#### sendWithoutRep

    public void sendWithoutRep(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`