Package org.xnio.channels
Interface SslChannel
- All Superinterfaces:
AutoCloseable
,BoundChannel
,Channel
,Closeable
,CloseableChannel
,Configurable
,ConnectedChannel
,InterruptibleChannel
- All Known Subinterfaces:
ConnectedSslStreamChannel
- All Known Implementing Classes:
AssembledConnectedSslStreamChannel
,AssembledSslChannel
,JsseSslConnection
,JsseSslStreamConnection
,SslConnection
A channel which can use SSL/TLS to negotiate a security layer.
-
Field Summary
Fields inherited from interface org.xnio.channels.Configurable
EMPTY
-
Method Summary
Modifier and TypeMethodDescriptionChannelListener.Setter
<? extends SslChannel> Get the setter which can be used to change the close listener for this channel.ChannelListener.Setter
<? extends SslChannel> Get the setter which can be used to change the handshake listener for this channel.Get the currentSSLSession
for this channel.void
Start or restart the SSL/TLS handshake.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
-
Method Details
-
startHandshake
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.- Throws:
IOException
- if an I/O error occurs
-
getSslSession
SSLSession getSslSession()Get the currentSSLSession
for this channel.- Returns:
- the current
SSLSession
-
getCloseSetter
ChannelListener.Setter<? extends SslChannel> getCloseSetter()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
- Returns:
- the setter
-
getHandshakeSetter
ChannelListener.Setter<? extends SslChannel> getHandshakeSetter()Get the setter which can be used to change the handshake listener for this channel.- Returns:
- the setter
-