AsyncChannelWrapper (Apache Tomcat 10.1.14 API Documentation)

Package org.apache.tomcat.websocket

## 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

    All Methods Instance Methods Abstract Methods
    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 Detail

    - #### 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`