AsyncChannelWrapper (Apache Tomcat 9.0.118 API Documentation)
Description: declaration: package: org.apache.tomcat.websocket, interface: AsyncChannelWrapper

# Interface AsyncChannelWrapper

All Known Implementing Classes:
  `AsyncChannelWrapperNonSecure, AsyncChannelWrapperSecure`

public interface AsyncChannelWrapper
This is a wrapper for a `AsynchronousSocketChannel` that limits the methods available thereby simplifying the process of implementing SSL/TLS support since there are fewer methods to intercept.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `close()`
  `SocketAddress`
  `getLocalAddress()`
  `Future<Void>`
  `handshake()`
  `Future<Integer>`
  `read(ByteBuffer dst)`
  `<B, A extends B>
  void`
  `read(ByteBuffer dst, A attachment, CompletionHandler<Integer,B> handler)`
  `Future<Integer>`
  `write(ByteBuffer src)`
  `<B, A extends B>
  void`
  `write(ByteBuffer[] srcs, int offset, int length, long timeout, TimeUnit unit, A attachment, CompletionHandler<Long,B> handler)`

- ## Method Details

  - ### read

    Future<Integer> read(ByteBuffer dst)

  - ### read

    <B, A extends B> void read(ByteBuffer dst, A attachment, CompletionHandler<Integer,B> handler)

  - ### write

    Future<Integer> write(ByteBuffer src)

  - ### write

    <B, A extends B> void write(ByteBuffer[] srcs, int offset, int length, long timeout, TimeUnit unit, A attachment, CompletionHandler<Long,B> handler)

  - ### close

    void close()

  - ### handshake

    Future<Void> handshake() throws SSLException
    Throws:
      `SSLException`

  - ### getLocalAddress

    SocketAddress getLocalAddress() throws IOException
    Throws:
      `IOException`