-
- All Superinterfaces:
java.lang.AutoCloseable
,BoundChannel
,java.nio.channels.Channel
,java.io.Closeable
,CloseableChannel
,Configurable
,ConnectedChannel
,java.nio.channels.InterruptibleChannel
- All Known Subinterfaces:
ConnectedSslStreamChannel
- All Known Implementing Classes:
AssembledConnectedSslStreamChannel
,AssembledSslChannel
,JsseSslConnection
,JsseSslStreamConnection
,SslConnection
public interface SslChannel extends ConnectedChannel
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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ChannelListener.Setter<? extends SslChannel>
getCloseSetter()
Get the setter which can be used to change the close listener for this channel.ChannelListener.Setter<? extends SslChannel>
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 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 Detail
-
startHandshake
void startHandshake() throws java.io.IOException
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:
java.io.IOException
- if an I/O error occurs
-
getSslSession
javax.net.ssl.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
-
-