Module 
Package org.xnio.ssl

Class JsseXnioSsl

    • Field Detail

      • NEW_IMPL

        public static final boolean NEW_IMPL
    • Constructor Detail

      • JsseXnioSsl

        public JsseXnioSsl​(Xnio 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
      • JsseXnioSsl

        public JsseXnioSsl​(Xnio 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
    • 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​(SslConnection connection)
        Get the SSL engine for a given connection.
        Returns:
        the SSL engine
      • openSslConnection

        public IoFuture<SslConnection> openSslConnection​(XnioWorker worker,
                                                         java.net.InetSocketAddress bindAddress,
                                                         java.net.InetSocketAddress destination,
                                                         ChannelListener<? super SslConnection> openListener,
                                                         ChannelListener<? super BoundChannel> bindListener,
                                                         OptionMap optionMap)
        Description copied from class: XnioSsl
        Create an SSL connection to a remote host.
        Specified by:
        openSslConnection in class XnioSsl
        Parameters:
        worker - the worker to use
        bindAddress - the local bind address
        destination - the destination connection address
        openListener - the initial open-connection listener
        bindListener - the bind listener
        optionMap - the option map
        Returns:
        the SSL connection
      • openSslConnection

        public IoFuture<SslConnection> openSslConnection​(XnioIoThread ioThread,
                                                         java.net.InetSocketAddress bindAddress,
                                                         java.net.InetSocketAddress destination,
                                                         ChannelListener<? super SslConnection> openListener,
                                                         ChannelListener<? super BoundChannel> bindListener,
                                                         OptionMap optionMap)
        Description copied from class: XnioSsl
        Create an SSL connection to a remote host.
        Specified by:
        openSslConnection in class XnioSsl
        Parameters:
        ioThread - the IO Thread to use
        bindAddress - the local bind address
        destination - the destination connection address
        openListener - the initial open-connection listener
        bindListener - the bind listener
        optionMap - the option map
        Returns:
        the SSL connection
      • createSslConnectionServer

        public AcceptingChannel<SslConnection> createSslConnectionServer​(XnioWorker worker,
                                                                         java.net.InetSocketAddress bindAddress,
                                                                         ChannelListener<? super AcceptingChannel<SslConnection>> acceptListener,
                                                                         OptionMap optionMap)
                                                                  throws java.io.IOException
        Description copied from class: XnioSsl
        Create a bound TCP SSL server.
        Specified by:
        createSslConnectionServer in class XnioSsl
        Parameters:
        worker - the worker to use
        bindAddress - the address to bind to
        acceptListener - the initial accept listener
        optionMap - the initial configuration for the server
        Returns:
        the unbound TCP SSL server
        Throws:
        java.io.IOException - if the server could not be created