- 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.SSLSession
getSslSession()
Get the currentSSLSession
for this channel.void
startHandshake()
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.IOException
Description copied from interface:SslChannel
Start 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:
startHandshake
in interfaceSslChannel
- Throws:
java.io.IOException
- if an I/O error occurs
-
getSslSession
public javax.net.ssl.SSLSession getSslSession()
Description copied from interface:SslChannel
Get the currentSSLSession
for this channel.- Specified by:
getSslSession
in interfaceSslChannel
- Returns:
- the current
SSLSession
-
getHandshakeSetter
public ChannelListener.Setter<? extends AssembledSslChannel> getHandshakeSetter()
Description copied from interface:SslChannel
Get the setter which can be used to change the handshake listener for this channel.- Specified by:
getHandshakeSetter
in interfaceSslChannel
- Returns:
- the setter
-
getCloseSetter
public ChannelListener.Setter<? extends AssembledSslChannel> getCloseSetter()
Description copied from interface:CloseableChannel
Get 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:
getCloseSetter
in interfaceBoundChannel
- Specified by:
getCloseSetter
in interfaceCloseableChannel
- Specified by:
getCloseSetter
in interfaceConnectedChannel
- Specified by:
getCloseSetter
in interfaceSslChannel
- Overrides:
getCloseSetter
in classAssembledConnectedChannel
- Returns:
- the setter
-
-