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
-
-
Constructor Summary
Constructors Constructor Description UndertowXnioSsl(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, javax.net.ssl.SSLContext sslContext)
Construct a new instance.UndertowXnioSsl(org.xnio.Xnio xnio, org.xnio.OptionMap optionMap, ByteBufferPool bufferPool, javax.net.ssl.SSLContext sslContext, java.util.concurrent.Executor delegatedTaskExecutor)
Construct a new instance.UndertowXnioSsl(org.xnio.Xnio xnio, org.xnio.OptionMap optionMap, javax.net.ssl.SSLContext sslContext)
Construct a new instance.UndertowXnioSsl(org.xnio.Xnio xnio, org.xnio.OptionMap optionMap, javax.net.ssl.SSLContext sslContext, java.util.concurrent.Executor delegatedTaskExecutor)
Construct a new instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.xnio.IoFuture<org.xnio.channels.ConnectedSslStreamChannel>
connectSsl(org.xnio.XnioWorker worker, java.net.InetSocketAddress bindAddress, java.net.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, java.net.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, java.net.InetSocketAddress bindAddress, org.xnio.ChannelListener<? super org.xnio.channels.AcceptingChannel<org.xnio.channels.ConnectedSslStreamChannel>> acceptListener, org.xnio.OptionMap optionMap)
static SslConduit
getSslConduit(org.xnio.ssl.SslConnection connection)
javax.net.ssl.SSLContext
getSslContext()
Get the JSSE SSL context for this provider instance.static javax.net.ssl.SSLEngine
getSslEngine(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, java.net.InetSocketAddress bindAddress, java.net.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, java.net.InetSocketAddress bindAddress, java.net.InetSocketAddress destination, org.xnio.ChannelListener<? super org.xnio.ssl.SslConnection> openListener, org.xnio.ChannelListener<? super org.xnio.channels.BoundChannel> bindListener, org.xnio.OptionMap optionMap)
void
updateSSLContext(javax.net.ssl.SSLContext context)
Updates the SSLContext that is in use.org.xnio.ssl.SslConnection
wrapExistingConnection(org.xnio.StreamConnection connection, org.xnio.OptionMap optionMap)
org.xnio.ssl.SslConnection
wrapExistingConnection(org.xnio.StreamConnection connection, org.xnio.OptionMap optionMap, boolean clientMode)
org.xnio.ssl.SslConnection
wrapExistingConnection(org.xnio.StreamConnection connection, org.xnio.OptionMap optionMap, java.net.URI destinationURI)
-
-
-
Constructor Detail
-
UndertowXnioSsl
public UndertowXnioSsl(org.xnio.Xnio xnio, org.xnio.OptionMap optionMap) throws java.security.NoSuchProviderException, java.security.NoSuchAlgorithmException, java.security.KeyManagementException
Construct a new instance.- Parameters:
xnio
- the XNIO instance to associate withoptionMap
- the options for this provider- Throws:
java.security.NoSuchProviderException
- if the given SSL provider is not foundjava.security.NoSuchAlgorithmException
- if the given SSL algorithm is not supportedjava.security.KeyManagementException
- if the SSL context could not be initialized
-
UndertowXnioSsl
public UndertowXnioSsl(org.xnio.Xnio xnio, org.xnio.OptionMap optionMap, javax.net.ssl.SSLContext sslContext)
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, javax.net.ssl.SSLContext sslContext, java.util.concurrent.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 java.security.NoSuchProviderException, java.security.NoSuchAlgorithmException, java.security.KeyManagementException
Construct a new instance.- Parameters:
xnio
- the XNIO instance to associate withoptionMap
- the options for this providerbufferPool
-- Throws:
java.security.NoSuchProviderException
- if the given SSL provider is not foundjava.security.NoSuchAlgorithmException
- if the given SSL algorithm is not supportedjava.security.KeyManagementException
- if the SSL context could not be initialized
-
UndertowXnioSsl
public UndertowXnioSsl(org.xnio.Xnio xnio, org.xnio.OptionMap optionMap, ByteBufferPool bufferPool, javax.net.ssl.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, javax.net.ssl.SSLContext sslContext, java.util.concurrent.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 Detail
-
getSslContext
public javax.net.ssl.SSLContext getSslContext()
Get the JSSE SSL context for this provider instance.- Returns:
- the SSL context
-
getSslEngine
public static javax.net.ssl.SSLEngine getSslEngine(org.xnio.ssl.SslConnection connection)
Get the SSL engine for a given connection.- Returns:
- the SSL engine
-
getSslConduit
public static SslConduit getSslConduit(org.xnio.ssl.SslConnection connection)
-
connectSsl
public org.xnio.IoFuture<org.xnio.channels.ConnectedSslStreamChannel> connectSsl(org.xnio.XnioWorker worker, java.net.InetSocketAddress bindAddress, java.net.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:
connectSsl
in classorg.xnio.ssl.XnioSsl
-
openSslConnection
public org.xnio.IoFuture<org.xnio.ssl.SslConnection> openSslConnection(org.xnio.XnioWorker worker, java.net.InetSocketAddress bindAddress, java.net.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:
openSslConnection
in classorg.xnio.ssl.XnioSsl
-
openSslConnection
public org.xnio.IoFuture<org.xnio.ssl.SslConnection> openSslConnection(org.xnio.XnioIoThread ioThread, java.net.InetSocketAddress bindAddress, java.net.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:
openSslConnection
in 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, java.net.URI destinationURI)
-
createSslTcpServer
public org.xnio.channels.AcceptingChannel<org.xnio.channels.ConnectedSslStreamChannel> createSslTcpServer(org.xnio.XnioWorker worker, java.net.InetSocketAddress bindAddress, org.xnio.ChannelListener<? super org.xnio.channels.AcceptingChannel<org.xnio.channels.ConnectedSslStreamChannel>> acceptListener, org.xnio.OptionMap optionMap) throws java.io.IOException
- Specified by:
createSslTcpServer
in classorg.xnio.ssl.XnioSsl
- Throws:
java.io.IOException
-
updateSSLContext
public void updateSSLContext(javax.net.ssl.SSLContext context)
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, java.net.InetSocketAddress bindAddress, org.xnio.ChannelListener<? super org.xnio.channels.AcceptingChannel<org.xnio.ssl.SslConnection>> acceptListener, org.xnio.OptionMap optionMap) throws java.io.IOException
- Specified by:
createSslConnectionServer
in classorg.xnio.ssl.XnioSsl
- Throws:
java.io.IOException
-
-