- java.lang.Object
-
- org.xnio.channels.AssembledChannel
-
- org.xnio.channels.AssembledConnectedChannel
-
- org.xnio.channels.AssembledSslChannel
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,java.nio.channels.Channel,java.nio.channels.InterruptibleChannel,BoundChannel,CloseableChannel,Configurable,ConnectedChannel,SslChannel
public class AssembledSslChannel extends AssembledConnectedChannel implements SslChannel
An assembled SSL channel.- Author:
- David M. Lloyd
-
-
Field Summary
-
Fields inherited from interface org.xnio.channels.Configurable
EMPTY
-
-
Constructor Summary
Constructors Constructor Description AssembledSslChannel(SuspendableReadChannel readChannel, SuspendableWriteChannel writeChannel)Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ChannelListener.Setter<? extends AssembledSslChannel>getCloseSetter()Get the setter which can be used to change the close listener for this channel.ChannelListener.Setter<? extends AssembledSslChannel>getHandshakeSetter()Get the setter which can be used to change the handshake listener for this channel.javax.net.ssl.SSLSessiongetSslSession()Get the currentSSLSessionfor this channel.voidstartHandshake()Start or restart the SSL/TLS handshake.-
Methods inherited from class org.xnio.channels.AssembledConnectedChannel
getLocalAddress, getLocalAddress, getPeerAddress, getPeerAddress
-
Methods inherited from class org.xnio.channels.AssembledChannel
close, getIoThread, getOption, getWorker, isOpen, setOption, supportsOption
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.xnio.channels.BoundChannel
getLocalAddress, getLocalAddress
-
Methods inherited from interface org.xnio.channels.CloseableChannel
close, getIoThread, getWorker
-
Methods inherited from interface org.xnio.channels.Configurable
getOption, setOption, supportsOption
-
Methods inherited from interface org.xnio.channels.ConnectedChannel
getPeerAddress, getPeerAddress
-
-
-
-
Constructor Detail
-
AssembledSslChannel
public AssembledSslChannel(SuspendableReadChannel readChannel, SuspendableWriteChannel writeChannel)
Construct a new instance. At least one side must be an SSL channel.- Parameters:
readChannel- the read channelwriteChannel- the write channel
-
-
Method Detail
-
startHandshake
public void startHandshake() throws java.io.IOExceptionDescription copied from interface:SslChannelStart or restart the SSL/TLS handshake. To force a complete SSL/TLS session renegotiation, the current session should be invalidated prior to calling this method. This method is not needed for the initial handshake as sending or receiving over the channel will automatically initiate it.- Specified by:
startHandshakein interfaceSslChannel- Throws:
java.io.IOException- if an I/O error occurs
-
getSslSession
public javax.net.ssl.SSLSession getSslSession()
Description copied from interface:SslChannelGet the currentSSLSessionfor this channel.- Specified by:
getSslSessionin interfaceSslChannel- Returns:
- the current
SSLSession
-
getHandshakeSetter
public ChannelListener.Setter<? extends AssembledSslChannel> getHandshakeSetter()
Description copied from interface:SslChannelGet the setter which can be used to change the handshake listener for this channel.- Specified by:
getHandshakeSetterin interfaceSslChannel- Returns:
- the setter
-
getCloseSetter
public ChannelListener.Setter<? extends AssembledSslChannel> getCloseSetter()
Description copied from interface:CloseableChannelGet the setter which can be used to change the close listener for this channel. If the channel is already closed, then the listener will not be called.- Specified by:
getCloseSetterin interfaceBoundChannel- Specified by:
getCloseSetterin interfaceCloseableChannel- Specified by:
getCloseSetterin interfaceConnectedChannel- Specified by:
getCloseSetterin interfaceSslChannel- Overrides:
getCloseSetterin classAssembledConnectedChannel- Returns:
- the setter
-
-