Top Description Methods
org.apache.tomcat.websocket

public Interface AsyncChannelWrapper

Known Direct Implementers
org.apache.tomcat.websocket.AsyncChannelWrapperNonSecure, org.apache.tomcat.websocket.AsyncChannelWrapperSecure
Imports
java.io.IOException, java.net.SocketAddress, java.nio.ByteBuffer, java.nio.channels.CompletionHandler, java.util.concurrent.Future, .TimeUnit, javax.net.ssl.SSLException

This is a wrapper for a java.nio.channels.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 TypeMethod and Description
public void
public SocketAddress
public Future<Void>
public Future<Integer>
public <B, A extends B> void
read(ByteBuffer dst, A attachment, CompletionHandler<Integer, B> handler)

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

Method Detail

closeback to summary
public void close()
getLocalAddressback to summary
public SocketAddress getLocalAddress() throws IOException
handshakeback to summary
public Future<Void> handshake() throws SSLException
readback to summary
public Future<Integer> read(ByteBuffer dst)
readback to summary
public <B, A extends B> void read(ByteBuffer dst, A attachment, CompletionHandler<Integer, B> handler)
writeback to summary
public Future<Integer> write(ByteBuffer src)
writeback to summary
public <B, A extends B> void write(ByteBuffer[] srcs, int offset, int length, long timeout, TimeUnit unit, A attachment, CompletionHandler<Long, B> handler)