Top Inners Fields Constructors Methods
io.undertow.protocols.ssl

pack-priv Class UndertowSslConnection

extends SslConnection
Class Inheritance
Imports
org.xnio.ChannelListener, .ChannelListeners, .Option, .Options, .SslClientAuthMode, .StreamConnection, io.undertow.connector.ByteBufferPool, org.xnio.ssl.SslConnection, javax.net.ssl.SSLEngine, .SSLSession, java.io.IOException, java.net.SocketAddress, java.util.Set, java.util.concurrent.Executor

Author
Stuart Douglas

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class

Field Summary

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

Constructor Summary

AccessConstructor and Description
pack-priv
UndertowSslConnection(StreamConnection
the underlying connection
delegate
,
SSLEngine engine, ByteBufferPool bufferPool, Executor delegatedTaskExecutor)

Construct a new instance.

Method Summary

Modifier and TypeMethod and Description
protected void
closeAction()

Overrides org.xnio.Connection.closeAction.

The close action to perform on this connection.

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.

pack-priv SslConduit
public SSLEngine
public SSLSession
getSslSession()

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

Implements org.xnio.channels.SslChannel.getSslSession.

Get the current SSLSession for this channel.

protected void
notifyReadClosed()

Overrides org.xnio.StreamConnection.notifyReadClosed.

Indicate to conduit handlers that reads have been closed.

protected void
notifyWriteClosed()

Overrides org.xnio.StreamConnection.notifyWriteClosed.

Indicate to conduit handlers that writes have been closed.

protected boolean
readClosed()

Overrides org.xnio.Connection.readClosed.

Indicate that reads have been closed 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.

protected boolean
writeClosed()

Overrides org.xnio.Connection.writeClosed.

Indicate that writes have been closed on this connection.

Inherited from org.xnio.ssl.SslConnection:
getCloseSetter

Field Detail

delegateback to summary
private final StreamConnection delegate
engineback to summary
private final SSLEngine engine
handshakeSetterback to summary
private final ChannelListener.SimpleSetter<SslConnection> handshakeSetter
sslConduitback to summary
private final SslConduit sslConduit
SUPPORTED_OPTIONSback to summary
private static final Set<Option<?>> SUPPORTED_OPTIONS

Constructor Detail

UndertowSslConnectionback to summary
pack-priv UndertowSslConnection(StreamConnection delegate, SSLEngine engine, ByteBufferPool bufferPool, Executor delegatedTaskExecutor)

Construct a new instance.

Parameters
delegate:StreamConnection

the underlying connection

Method Detail

closeActionback to summary
protected void closeAction()

Overrides org.xnio.Connection.closeAction.

Doc from org.xnio.Connection.closeAction.

The close action to perform on this connection.

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

Annotations
@Override
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

Annotations
@Override
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

Annotations
@Override
getSslConduitback to summary
pack-priv SslConduit getSslConduit()
getSSLEngineback to summary
public SSLEngine getSSLEngine()
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

Annotations
@Override
notifyReadClosedback to summary
protected void notifyReadClosed()

Overrides org.xnio.StreamConnection.notifyReadClosed.

Doc from org.xnio.Connection.notifyReadClosed.

Indicate to conduit handlers that reads have been closed.

Annotations
@Override
notifyWriteClosedback to summary
protected void notifyWriteClosed()

Overrides org.xnio.StreamConnection.notifyWriteClosed.

Doc from org.xnio.Connection.notifyWriteClosed.

Indicate to conduit handlers that writes have been closed.

Annotations
@Override
readClosedback to summary
protected boolean readClosed()

Overrides org.xnio.Connection.readClosed.

Doc from org.xnio.Connection.readClosed.

Indicate that reads have been closed on this connection.

Returns:boolean

true if read closure was successfully indicated; false if this method has already been called

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.

Annotations
@Override
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
writeClosedback to summary
protected boolean writeClosed()

Overrides org.xnio.Connection.writeClosed.

Doc from org.xnio.Connection.writeClosed.

Indicate that writes have been closed on this connection.

Returns:boolean

true if write closure was successfully indicated; false if this method has already been called

Annotations
@Override
io.undertow.protocols.ssl back to summary

private final Class UndertowSslConnection.HandshakeCallback

extends Object
implements Runnable
Class Inheritance
  • java.lang.Object
  • io.undertow.protocols.ssl.UndertowSslConnection.HandshakeCallback
All Implemented Interfaces
java.lang.Runnable

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
run()

Implements java.lang.Runnable.run.

Runs this operation.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

HandshakeCallbackback to summary
private HandshakeCallback()

Method Detail

runback to summary
public void run()

Implements java.lang.Runnable.run.

Doc from java.lang.Runnable.run.

Runs this operation.

Annotations
@Override