Class 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 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)  
      • 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 java.security.NoSuchProviderException,
                               java.security.NoSuchAlgorithmException,
                               java.security.KeyManagementException
        Construct a new instance.
        Parameters:
        xnio - the XNIO instance to associate with
        optionMap - the options for this provider
        Throws:
        java.security.NoSuchProviderException - if the given SSL provider is not found
        java.security.NoSuchAlgorithmException - if the given SSL algorithm is not supported
        java.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 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,
                               javax.net.ssl.SSLContext sslContext,
                               java.util.concurrent.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 java.security.NoSuchProviderException,
                               java.security.NoSuchAlgorithmException,
                               java.security.KeyManagementException
        Construct a new instance.
        Parameters:
        xnio - the XNIO instance to associate with
        optionMap - the options for this provider
        bufferPool -
        Throws:
        java.security.NoSuchProviderException - if the given SSL provider is not found
        java.security.NoSuchAlgorithmException - if the given SSL algorithm is not supported
        java.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 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,
                               javax.net.ssl.SSLContext sslContext,
                               java.util.concurrent.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 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 class org.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 class org.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 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,
                                                                 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 class org.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 class org.xnio.ssl.XnioSsl
        Throws:
        java.io.IOException