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

Constructors
Constructor and 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, 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

All Methods Static Methods Instance Methods Concrete Methods
`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)`
`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 SslConduit` `getSslConduit(org.xnio.ssl.SslConnection connection)`
`SSLContext` `getSslContext()` Get the JSSE SSL context for this provider instance.
`static 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, 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)`
`void` `updateSSLContext(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, URI destinationURI)`

### Methods inherited from class org.xnio.ssl.XnioSsl

`connectSsl, connectSsl, connectSsl, openSslConnection, openSslConnection, openSslConnection, openSslConnection, openSslConnection, openSslConnection`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### 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 with
  `optionMap` - the options for this provider
Throws:
  `NoSuchProviderException` - if the given SSL provider is not found
  `NoSuchAlgorithmException` - if the given SSL algorithm is not supported
  `KeyManagementException` - if the SSL context could not be initialized

#### UndertowXnioSsl

    public UndertowXnioSsl(org.xnio.Xnio xnio,
                           org.xnio.OptionMap optionMap,
                           SSLContext sslContext)

Construct a new instance.

Parameters:
  `xnio` - the XNIO instance to associate with
  `optionMap` - the options for this provider
  `sslContext` - 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 with
  `optionMap` - the options for this provider
  `sslContext` - the SSL context to use for this instance
  `delegatedTaskExecutor` - Executor instance used to run `delegated 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 with
  `optionMap` - the options for this provider
  `bufferPool` -
Throws:
  `NoSuchProviderException` - if the given SSL provider is not found
  `NoSuchAlgorithmException` - if the given SSL algorithm is not supported
  `KeyManagementException` - 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 with
  `optionMap` - the options for this provider
  `bufferPool` -
  `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 with
  `optionMap` - the options for this provider
  `bufferPool` -
  `sslContext` - the SSL context to use for this instance
  `delegatedTaskExecutor` - Executor instance used to run `delegated tasks`.

### Method Detail

#### getSslContext

    public SSLContext getSslContext()

Get the JSSE SSL context for this provider instance.

Returns:
  the SSL context

#### getSslEngine

    public static 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,
                                                                                     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:
  `connectSsl` in class `org.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:
  `openSslConnection` in class `org.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:
  `openSslConnection` in class `org.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:
  `createSslTcpServer` in class `org.xnio.ssl.XnioSsl`
Throws:
  `IOException`

#### updateSSLContext

    public void updateSSLContext(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,
                                                                                                    InetSocketAddress bindAddress,
                                                                                                    org.xnio.ChannelListener<? super org.xnio.channels.AcceptingChannel<org.xnio.ssl.SslConnection>> acceptListener,
                                                                                                    org.xnio.OptionMap optionMap)
                                                                                             throws IOException

Specified by:
  `createSslConnectionServer` in class `org.xnio.ssl.XnioSsl`
Throws:
  `IOException`