AsyncChannelWrapper (Apache Tomcat 9.0.37 API Documentation)

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 and Description
    --- | ---
    `void` | `close()`
    `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`

Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.