AsyncChannelWrapperSecure (Apache Tomcat 7.0.96 API Documentation)

org.apache.tomcat.websocket

## Class AsyncChannelWrapperSecure

- java.lang.Object
- - org.apache.tomcat.websocket.AsyncChannelWrapperSecure

- All Implemented Interfaces:
    AsyncChannelWrapper

      public class AsyncChannelWrapperSecure
      extends java.lang.Object
      implements AsyncChannelWrapper

  Wraps the `AsynchronousSocketChannel` with SSL/TLS. This needs a lot more testing before it can be considered robust.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AsyncChannelWrapperSecure(java.nio.channels.AsynchronousSocketChannel socketChannel, javax.net.ssl.SSLEngine sslEngine)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `java.util.concurrent.Future<java.lang.Void>` | `handshake()`
    `java.util.concurrent.Future<java.lang.Integer>` | `read(java.nio.ByteBuffer dst)`
    `<B,A extends B> void` | `read(java.nio.ByteBuffer dst, A attachment, java.nio.channels.CompletionHandler<java.lang.Integer,B> handler)`
    `java.util.concurrent.Future<java.lang.Integer>` | `write(java.nio.ByteBuffer src)`
    `<B,A extends B> void` | `write(java.nio.ByteBuffer[] srcs, int offset, int length, long timeout, java.util.concurrent.TimeUnit unit, A attachment, java.nio.channels.CompletionHandler<java.lang.Long,B> handler)`

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

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

- - ### Constructor Detail

    - #### AsyncChannelWrapperSecure

          public AsyncChannelWrapperSecure(java.nio.channels.AsynchronousSocketChannel socketChannel,
                                   javax.net.ssl.SSLEngine sslEngine)

  - ### Method Detail

    - #### read

          public java.util.concurrent.Future<java.lang.Integer> read(java.nio.ByteBuffer dst)

      Specified by:
        `read` in interface `AsyncChannelWrapper`

    - #### read

          public <B,A extends B> void read(java.nio.ByteBuffer dst,
                                  A attachment,
                                  java.nio.channels.CompletionHandler<java.lang.Integer,B> handler)

      Specified by:
        `read` in interface `AsyncChannelWrapper`

    - #### write

          public java.util.concurrent.Future<java.lang.Integer> write(java.nio.ByteBuffer src)

      Specified by:
        `write` in interface `AsyncChannelWrapper`

    - #### write

          public <B,A extends B> void write(java.nio.ByteBuffer[] srcs,
                                   int offset,
                                   int length,
                                   long timeout,
                                   java.util.concurrent.TimeUnit unit,
                                   A attachment,
                                   java.nio.channels.CompletionHandler<java.lang.Long,B> handler)

      Specified by:
        `write` in interface `AsyncChannelWrapper`

    - #### close

          public void close()

      Specified by:
        `close` in interface `AsyncChannelWrapper`

    - #### handshake

          public java.util.concurrent.Future<java.lang.Void> handshake()
                                                                throws javax.net.ssl.SSLException

      Specified by:
        `handshake` in interface `AsyncChannelWrapper`
      Throws:
        `javax.net.ssl.SSLException`

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