Top Fields Constructors Methods
org.xnio.ssl

public final Class JsseSslConnection

extends SslConnection
Class Inheritance
Imports
java.io.IOException, java.net.SocketAddress, java.nio.ByteBuffer, java.util.Set, javax.net.ssl.SSLEngine, .SSLSession, org.xnio.ChannelListener, .ChannelListeners, .Option, .Options, .Pool, .SslClientAuthMode, .StreamConnection

Field Summary

Modifier and TypeField and Description
private final JsseStreamConduit
private final ChannelListener.SimpleSetter<SslConnection>
private final StreamConnection
private static final Set<Option<?>>

Constructor Summary

AccessConstructor and Description
public
JsseSslConnection(final StreamConnection streamConnection, final SSLEngine engine)

pack-priv
JsseSslConnection(final StreamConnection streamConnection, final SSLEngine engine, final Pool<ByteBuffer> socketBufferPool, final Pool<ByteBuffer> applicationBufferPool)
References Deprecated Pool is deprecated or references (maybe indirectly) at least one deprecated element.

Method Summary

Modifier and TypeMethod and Description
protected void
closeAction()

Overrides org.xnio.Connection.closeAction.

The close action to perform on this connection.

public SSLEngine
public ChannelListener.Setter<? extends SslConnection>
getHandshakeSetter()

Implements abstract org.xnio.ssl.SslConnection.getHandshakeSetter.

Implements org.xnio.channels.SslChannel.getHandshakeSetter.

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

public SocketAddress
getLocalAddress()

Implements org.xnio.channels.BoundChannel.getLocalAddress.

Get the local address that this channel is bound to.

public <T> T
getOption(final Option<T>
the option to get
option
)

Overrides org.xnio.Connection.getOption.

Implements org.xnio.channels.Configurable.getOption.

Get the value of a channel option.

public SocketAddress
getPeerAddress()

Implements org.xnio.channels.ConnectedChannel.getPeerAddress.

Get the peer address of this channel.

public SSLSession
getSslSession()

Implements abstract org.xnio.ssl.SslConnection.getSslSession.

Implements org.xnio.channels.SslChannel.getSslSession.

Get the current SSLSession for this channel.

pack-priv void
public boolean
isOpen()

Overrides org.xnio.Connection.isOpen.

Implements java.nio.channels.Channel.isOpen.

Tells whether or not this channel is open.

public boolean
isReadShutdown()

Overrides org.xnio.Connection.isReadShutdown.

Determine whether reads have been shut down on this connection.

public boolean
isWriteShutdown()

Overrides org.xnio.Connection.isWriteShutdown.

Determine whether writes have been shut down on this connection.

public <T> T
setOption(final Option<T>
the option to set
option
,
final T
the value of the option to set
value
)

Overrides org.xnio.Connection.setOption.

Implements org.xnio.channels.Configurable.setOption.

Set an option for this channel.

public void
startHandshake()

Implements abstract org.xnio.ssl.SslConnection.startHandshake.

Implements org.xnio.channels.SslChannel.startHandshake.

Start or restart the SSL/TLS handshake.

public boolean
supportsOption(final Option<?>
the option
option
)

Overrides org.xnio.Connection.supportsOption.

Implements org.xnio.channels.Configurable.supportsOption.

Determine whether an option is supported on this channel.

Inherited from org.xnio.ssl.SslConnection:
getCloseSetter

Field Detail

conduitback to summary
private final JsseStreamConduit conduit
handshakeSetterback to summary
private final ChannelListener.SimpleSetter<SslConnection> handshakeSetter
streamConnectionback to summary
private final StreamConnection streamConnection
SUPPORTED_OPTIONSback to summary
private static final Set<Option<?>> SUPPORTED_OPTIONS

Constructor Detail

JsseSslConnectionback to summary
public JsseSslConnection(final StreamConnection streamConnection, final SSLEngine engine)
JsseSslConnectionback to summary
pack-priv JsseSslConnection(final StreamConnection streamConnection, final SSLEngine engine, final Pool<ByteBuffer> socketBufferPool, final Pool<ByteBuffer> applicationBufferPool)

References Deprecated

Pool is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Method Detail

closeActionback to summary
protected void closeAction() throws IOException

Overrides org.xnio.Connection.closeAction.

Doc from org.xnio.Connection.closeAction.

The close action to perform on this connection.

Exceptions
IOException:
if close fails
getEngineback to summary
public SSLEngine getEngine()
getHandshakeSetterback to summary
public ChannelListener.Setter<? extends SslConnection> getHandshakeSetter()

Implements abstract org.xnio.ssl.SslConnection.getHandshakeSetter.

Implements org.xnio.channels.SslChannel.getHandshakeSetter.

Doc from org.xnio.ssl.SslConnection.getHandshakeSetter.

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

Returns:ChannelListener.Setter<? extends SslConnection>

the setter

getLocalAddressback to summary
public SocketAddress getLocalAddress()

Implements org.xnio.channels.BoundChannel.getLocalAddress.

Doc from org.xnio.channels.BoundChannel.getLocalAddress.

Get the local address that this channel is bound to.

Returns:SocketAddress

the local address

getOptionback to summary
public <T> T getOption(final Option<T> option) throws IOException

Overrides org.xnio.Connection.getOption.

Implements org.xnio.channels.Configurable.getOption.

Doc from org.xnio.channels.Configurable.getOption.

Get the value of a channel option.

Parameters
<T>
the type of the option value
option:Option<T>

the option to get

Returns:T

the value of the option, or null if it is not set

Annotations
@Override
Exceptions
IOException:
if an I/O error occurred when reading the option
getPeerAddressback to summary
public SocketAddress getPeerAddress()

Implements org.xnio.channels.ConnectedChannel.getPeerAddress.

Doc from org.xnio.channels.ConnectedChannel.getPeerAddress.

Get the peer address of this channel.

Returns:SocketAddress

the peer address

getSslSessionback to summary
public SSLSession getSslSession()

Implements abstract org.xnio.ssl.SslConnection.getSslSession.

Implements org.xnio.channels.SslChannel.getSslSession.

Doc from org.xnio.ssl.SslConnection.getSslSession.

Get the current SSLSession for this channel.

Returns:SSLSession

the current SSLSession

invokeHandshakeListenerback to summary
pack-priv void invokeHandshakeListener()
isOpenback to summary
public boolean isOpen()

Overrides org.xnio.Connection.isOpen.

Implements java.nio.channels.Channel.isOpen.

Doc from java.nio.channels.Channel.isOpen.

Tells whether or not this channel is open.

Returns:boolean

true if, and only if, this channel is open

Annotations
@Override
isReadShutdownback to summary
public boolean isReadShutdown()

Overrides org.xnio.Connection.isReadShutdown.

Doc from org.xnio.Connection.isReadShutdown.

Determine whether reads have been shut down on this connection.

Returns:boolean

true if reads were shut down

Annotations
@Override
isWriteShutdownback to summary
public boolean isWriteShutdown()

Overrides org.xnio.Connection.isWriteShutdown.

Doc from org.xnio.Connection.isWriteShutdown.

Determine whether writes have been shut down on this connection.

Returns:boolean

true if writes were shut down

Annotations
@Override
setOptionback to summary
public <T> T setOption(final Option<T> option, final T value) throws IllegalArgumentException, IOException

Overrides org.xnio.Connection.setOption.

Implements org.xnio.channels.Configurable.setOption.

Doc from org.xnio.channels.Configurable.setOption.

Set an option for this channel. Unsupported options are ignored.

Parameters
<T>
the type of the option value
option:Option<T>

the option to set

value:T

the value of the option to set

Returns:T

the previous option value, if any

Annotations
@Override
Exceptions
IllegalArgumentException:
if the value is not acceptable for this option
IOException:
if an I/O error occurred when modifying the option
startHandshakeback to summary
public void startHandshake() throws IOException

Implements abstract org.xnio.ssl.SslConnection.startHandshake.

Implements org.xnio.channels.SslChannel.startHandshake.

Doc from org.xnio.ssl.SslConnection.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
supportsOptionback to summary
public boolean supportsOption(final Option<?> option)

Overrides org.xnio.Connection.supportsOption.

Implements org.xnio.channels.Configurable.supportsOption.

Doc from org.xnio.channels.Configurable.supportsOption.

Determine whether an option is supported on this channel.

Parameters
option:Option<?>

the option

Returns:boolean

true if it is supported

Annotations
@Override