Package org.apache.tomcat.websocket
Class AsyncChannelWrapperSecure
- java.lang.Object
-
- org.apache.tomcat.websocket.AsyncChannelWrapperSecure
-
- All Implemented Interfaces:
AsyncChannelWrapper
public class AsyncChannelWrapperSecure extends Object implements AsyncChannelWrapper
Wraps theAsynchronousSocketChannelwith SSL/TLS. This needs a lot more testing before it can be considered robust.
-
-
Constructor Summary
Constructors Constructor Description AsyncChannelWrapperSecure(AsynchronousSocketChannel socketChannel, SSLEngine sslEngine)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()SocketAddressgetLocalAddress()Future<Void>handshake()Future<Integer>read(ByteBuffer dst)<B,A extends B>
voidread(ByteBuffer dst, A attachment, CompletionHandler<Integer,B> handler)Future<Integer>write(ByteBuffer src)<B,A extends B>
voidwrite(ByteBuffer[] srcs, int offset, int length, long timeout, TimeUnit unit, A attachment, CompletionHandler<Long,B> handler)
-
-
-
Constructor Detail
-
AsyncChannelWrapperSecure
public AsyncChannelWrapperSecure(AsynchronousSocketChannel socketChannel, SSLEngine sslEngine)
-
-
Method Detail
-
read
public Future<Integer> read(ByteBuffer dst)
- Specified by:
readin interfaceAsyncChannelWrapper
-
read
public <B,A extends B> void read(ByteBuffer dst, A attachment, CompletionHandler<Integer,B> handler)
- Specified by:
readin interfaceAsyncChannelWrapper
-
write
public Future<Integer> write(ByteBuffer src)
- Specified by:
writein interfaceAsyncChannelWrapper
-
write
public <B,A extends B> void write(ByteBuffer[] srcs, int offset, int length, long timeout, TimeUnit unit, A attachment, CompletionHandler<Long,B> handler)
- Specified by:
writein interfaceAsyncChannelWrapper
-
close
public void close()
- Specified by:
closein interfaceAsyncChannelWrapper
-
handshake
public Future<Void> handshake() throws SSLException
- Specified by:
handshakein interfaceAsyncChannelWrapper- Throws:
SSLException
-
getLocalAddress
public SocketAddress getLocalAddress() throws IOException
- Specified by:
getLocalAddressin interfaceAsyncChannelWrapper- Throws:
IOException
-
-