Package io.undertow.protocols.ssl
Class UndertowXnioSsl
java.lang.Object
org.xnio.ssl.XnioSsl
io.undertow.protocols.ssl.UndertowXnioSsl
public class UndertowXnioSsl
extends org.xnio.ssl.XnioSsl
- Author:
- Stuart Douglas
-
Field Summary
Fields inherited from class org.xnio.ssl.XnioSsl
xnio -
Constructor Summary
ConstructorsConstructorDescriptionUndertowXnioSsl(org.xnio.Xnio xnio, org.xnio.OptionMap optionMap) Construct a new instance.UndertowXnioSsl(org.xnio.Xnio xnio, org.xnio.OptionMap optionMap, ByteBufferPool bufferPool) Construct a new instance.UndertowXnioSsl(org.xnio.Xnio xnio, org.xnio.OptionMap optionMap, ByteBufferPool bufferPool, SSLContext sslContext) Construct a new instance.UndertowXnioSsl(org.xnio.Xnio xnio, org.xnio.OptionMap optionMap, ByteBufferPool bufferPool, SSLContext sslContext, Executor delegatedTaskExecutor) Construct a new instance.UndertowXnioSsl(org.xnio.Xnio xnio, org.xnio.OptionMap optionMap, SSLContext sslContext) Construct a new instance.UndertowXnioSsl(org.xnio.Xnio xnio, org.xnio.OptionMap optionMap, SSLContext sslContext, Executor delegatedTaskExecutor) Construct a new instance. -
Method Summary
Modifier and TypeMethodDescriptionorg.xnio.IoFuture<org.xnio.channels.ConnectedSslStreamChannel>connectSsl(org.xnio.XnioWorker worker, InetSocketAddress bindAddress, InetSocketAddress destination, org.xnio.ChannelListener<? super org.xnio.channels.ConnectedSslStreamChannel> openListener, org.xnio.ChannelListener<? super org.xnio.channels.BoundChannel> bindListener, org.xnio.OptionMap optionMap) org.xnio.channels.AcceptingChannel<org.xnio.ssl.SslConnection>createSslConnectionServer(org.xnio.XnioWorker worker, InetSocketAddress bindAddress, org.xnio.ChannelListener<? super org.xnio.channels.AcceptingChannel<org.xnio.ssl.SslConnection>> acceptListener, org.xnio.OptionMap optionMap) org.xnio.channels.AcceptingChannel<org.xnio.channels.ConnectedSslStreamChannel>createSslTcpServer(org.xnio.XnioWorker worker, InetSocketAddress bindAddress, org.xnio.ChannelListener<? super org.xnio.channels.AcceptingChannel<org.xnio.channels.ConnectedSslStreamChannel>> acceptListener, org.xnio.OptionMap optionMap) static SslConduitgetSslConduit(org.xnio.ssl.SslConnection connection) Get the JSSE SSL context for this provider instance.static SSLEnginegetSslEngine(org.xnio.ssl.SslConnection connection) Get the SSL engine for a given connection.org.xnio.IoFuture<org.xnio.ssl.SslConnection>openSslConnection(org.xnio.XnioIoThread ioThread, InetSocketAddress bindAddress, InetSocketAddress destination, org.xnio.ChannelListener<? super org.xnio.ssl.SslConnection> openListener, org.xnio.ChannelListener<? super org.xnio.channels.BoundChannel> bindListener, org.xnio.OptionMap optionMap) org.xnio.IoFuture<org.xnio.ssl.SslConnection>openSslConnection(org.xnio.XnioWorker worker, InetSocketAddress bindAddress, InetSocketAddress destination, org.xnio.ChannelListener<? super org.xnio.ssl.SslConnection> openListener, org.xnio.ChannelListener<? super org.xnio.channels.BoundChannel> bindListener, org.xnio.OptionMap optionMap) voidupdateSSLContext(SSLContext context) Updates the SSLContext that is in use.org.xnio.ssl.SslConnectionwrapExistingConnection(org.xnio.StreamConnection connection, org.xnio.OptionMap optionMap) org.xnio.ssl.SslConnectionwrapExistingConnection(org.xnio.StreamConnection connection, org.xnio.OptionMap optionMap, boolean clientMode) org.xnio.ssl.SslConnectionwrapExistingConnection(org.xnio.StreamConnection connection, org.xnio.OptionMap optionMap, URI destinationURI) Methods inherited from class org.xnio.ssl.XnioSsl
connectSsl, connectSsl, connectSsl, openSslConnection, openSslConnection, openSslConnection, openSslConnection, openSslConnection, openSslConnection
-
Constructor Details
-
UndertowXnioSsl
public UndertowXnioSsl(org.xnio.Xnio xnio, org.xnio.OptionMap optionMap) throws NoSuchProviderException, NoSuchAlgorithmException, KeyManagementException Construct a new instance.- Parameters:
xnio- the XNIO instance to associate withoptionMap- the options for this provider- Throws:
NoSuchProviderException- if the given SSL provider is not foundNoSuchAlgorithmException- if the given SSL algorithm is not supportedKeyManagementException- if the SSL context could not be initialized
-
UndertowXnioSsl
Construct a new instance.- Parameters:
xnio- the XNIO instance to associate withoptionMap- the options for this providersslContext- the SSL context to use for this instance
-
UndertowXnioSsl
public UndertowXnioSsl(org.xnio.Xnio xnio, org.xnio.OptionMap optionMap, SSLContext sslContext, Executor delegatedTaskExecutor) Construct a new instance.- Parameters:
xnio- the XNIO instance to associate withoptionMap- the options for this providersslContext- the SSL context to use for this instancedelegatedTaskExecutor- Executor instance used to rundelegated tasks.
-
UndertowXnioSsl
public UndertowXnioSsl(org.xnio.Xnio xnio, org.xnio.OptionMap optionMap, ByteBufferPool bufferPool) throws NoSuchProviderException, NoSuchAlgorithmException, KeyManagementException Construct a new instance.- Parameters:
xnio- the XNIO instance to associate withoptionMap- the options for this providerbufferPool-- Throws:
NoSuchProviderException- if the given SSL provider is not foundNoSuchAlgorithmException- if the given SSL algorithm is not supportedKeyManagementException- if the SSL context could not be initialized
-
UndertowXnioSsl
public UndertowXnioSsl(org.xnio.Xnio xnio, org.xnio.OptionMap optionMap, ByteBufferPool bufferPool, SSLContext sslContext) Construct a new instance.- Parameters:
xnio- the XNIO instance to associate withoptionMap- the options for this providerbufferPool-sslContext- the SSL context to use for this instance
-
UndertowXnioSsl
public UndertowXnioSsl(org.xnio.Xnio xnio, org.xnio.OptionMap optionMap, ByteBufferPool bufferPool, SSLContext sslContext, Executor delegatedTaskExecutor) Construct a new instance.- Parameters:
xnio- the XNIO instance to associate withoptionMap- the options for this providerbufferPool-sslContext- the SSL context to use for this instancedelegatedTaskExecutor- Executor instance used to rundelegated tasks.
-
-
Method Details
-
getSslContext
Get the JSSE SSL context for this provider instance.- Returns:
- the SSL context
-
getSslEngine
Get the SSL engine for a given connection.- Returns:
- the SSL engine
-
getSslConduit
-
connectSsl
public org.xnio.IoFuture<org.xnio.channels.ConnectedSslStreamChannel> connectSsl(org.xnio.XnioWorker worker, InetSocketAddress bindAddress, InetSocketAddress destination, org.xnio.ChannelListener<? super org.xnio.channels.ConnectedSslStreamChannel> openListener, org.xnio.ChannelListener<? super org.xnio.channels.BoundChannel> bindListener, org.xnio.OptionMap optionMap) - Specified by:
connectSslin classorg.xnio.ssl.XnioSsl
-
openSslConnection
public org.xnio.IoFuture<org.xnio.ssl.SslConnection> openSslConnection(org.xnio.XnioWorker worker, InetSocketAddress bindAddress, InetSocketAddress destination, org.xnio.ChannelListener<? super org.xnio.ssl.SslConnection> openListener, org.xnio.ChannelListener<? super org.xnio.channels.BoundChannel> bindListener, org.xnio.OptionMap optionMap) - Specified by:
openSslConnectionin classorg.xnio.ssl.XnioSsl
-
openSslConnection
public org.xnio.IoFuture<org.xnio.ssl.SslConnection> openSslConnection(org.xnio.XnioIoThread ioThread, InetSocketAddress bindAddress, InetSocketAddress destination, org.xnio.ChannelListener<? super org.xnio.ssl.SslConnection> openListener, org.xnio.ChannelListener<? super org.xnio.channels.BoundChannel> bindListener, org.xnio.OptionMap optionMap) - Specified by:
openSslConnectionin classorg.xnio.ssl.XnioSsl
-
wrapExistingConnection
public org.xnio.ssl.SslConnection wrapExistingConnection(org.xnio.StreamConnection connection, org.xnio.OptionMap optionMap) -
wrapExistingConnection
public org.xnio.ssl.SslConnection wrapExistingConnection(org.xnio.StreamConnection connection, org.xnio.OptionMap optionMap, boolean clientMode) -
wrapExistingConnection
public org.xnio.ssl.SslConnection wrapExistingConnection(org.xnio.StreamConnection connection, org.xnio.OptionMap optionMap, URI destinationURI) -
createSslTcpServer
public org.xnio.channels.AcceptingChannel<org.xnio.channels.ConnectedSslStreamChannel> createSslTcpServer(org.xnio.XnioWorker worker, InetSocketAddress bindAddress, org.xnio.ChannelListener<? super org.xnio.channels.AcceptingChannel<org.xnio.channels.ConnectedSslStreamChannel>> acceptListener, org.xnio.OptionMap optionMap) throws IOException - Specified by:
createSslTcpServerin classorg.xnio.ssl.XnioSsl- Throws:
IOException
-
updateSSLContext
Updates the SSLContext that is in use. All new connections will use this new context, however established connections will not be affected.- Parameters:
context- The new context
-
createSslConnectionServer
public org.xnio.channels.AcceptingChannel<org.xnio.ssl.SslConnection> createSslConnectionServer(org.xnio.XnioWorker worker, InetSocketAddress bindAddress, org.xnio.ChannelListener<? super org.xnio.channels.AcceptingChannel<org.xnio.ssl.SslConnection>> acceptListener, org.xnio.OptionMap optionMap) throws IOException - Specified by:
createSslConnectionServerin classorg.xnio.ssl.XnioSsl- Throws:
IOException
-