Top Description Constructors Methods
org.xnio.ssl

public abstract Class SslConnection

extends StreamConnection
implements SslChannel
Class Inheritance
All Implemented Interfaces
org.xnio.channels.SslChannel, org.xnio.channels.ConnectedChannel, org.xnio.channels.BoundChannel, org.xnio.channels.CloseableChannel, org.xnio.channels.Configurable, java.nio.channels.InterruptibleChannel, java.nio.channels.Channel, java.io.Closeable, java.lang.AutoCloseable
Known Direct Subclasses
org.xnio.ssl.JsseSslConnection, org.xnio.ssl.JsseSslStreamConnection
Imports
java.io.IOException, javax.net.ssl.SSLSession, org.xnio.ChannelListener, .Options, .StreamConnection, .XnioIoThread, org.xnio.channels.SslChannel

A stream connection which can use SSL/TLS to negotiate a security layer.
Author
Flavia Rainone

Constructor Summary

AccessConstructor and Description
protected
SslConnection(XnioIoThread
the I/O thread of this connection
thread
)

Construct a new instance.

Method Summary

Modifier and TypeMethod and Description
public ChannelListener.Setter<? extends SslConnection>
public abstract ChannelListener.Setter<? extends SslConnection>

Returns:

the setter
getHandshakeSetter
()

Redeclares org.xnio.channels.SslChannel.getHandshakeSetter.

Get the setter which can be used to change the handshake listener for this channel.

public abstract SSLSession

Returns:

the current SSLSession
getSslSession
()

Redeclares org.xnio.channels.SslChannel.getSslSession.

Get the current SSLSession for this channel.

public abstract void
startHandshake()

Redeclares org.xnio.channels.SslChannel.startHandshake.

Start or restart the SSL/TLS handshake.

Inherited from org.xnio.StreamConnection:
getCloseListenergetSinkChannelgetSourceChannelnotifyReadClosednotifyWriteClosedsetCloseListenersetSinkConduitsetSourceConduit

Constructor Detail

SslConnectionback to summary
protected SslConnection(XnioIoThread thread)

Construct a new instance.

Parameters
thread:XnioIoThread

the I/O thread of this connection

Method Detail

getCloseSetterback to summary
public ChannelListener.Setter<? extends SslConnection> getCloseSetter()

Overrides org.xnio.StreamConnection.getCloseSetter.

Implements org.xnio.channels.SslChannel.getCloseSetter, org.xnio.channels.CloseableChannel.getCloseSetter, org.xnio.channels.ConnectedChannel.getCloseSetter.

Doc from org.xnio.channels.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.

Returns:ChannelListener.Setter<? extends SslConnection>

Doc from org.xnio.channels.CloseableChannel.getCloseSetter.

the setter

Annotations
@SuppressWarnings:unchecked
@Override
getHandshakeSetterback to summary
public abstract ChannelListener.Setter<? extends SslConnection> getHandshakeSetter()

Redeclares org.xnio.channels.SslChannel.getHandshakeSetter.

Get the setter which can be used to change the handshake listener for this channel.

Returns:ChannelListener.Setter<? extends SslConnection>

the setter

getSslSessionback to summary
public abstract SSLSession getSslSession()

Redeclares org.xnio.channels.SslChannel.getSslSession.

Get the current SSLSession for this channel.

Returns:SSLSession

the current SSLSession

startHandshakeback to summary
public abstract void startHandshake() throws IOException

Redeclares org.xnio.channels.SslChannel.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 unless the Options#SSL_STARTTLS option is set as sending or receiving over the channel will automatically initiate it. This method must not be called while a read or write operation is taking place.

Exceptions
IOException:
if an I/O error occurs