Package org.apache.activemq.artemis.spi.core.remoting.ssl

## Interface OpenSSLContextFactory

- All Superinterfaces:
    `java.lang.Comparable<OpenSSLContextFactory>`

      public interface OpenSSLContextFactory
      extends java.lang.Comparable<OpenSSLContextFactory>

  Service interface to create an `SslContext` for a configuration. This is ONLY used with OpenSSL. To create and use your own implementation you need to create a file `META-INF/services/org.apache.activemq.artemis.spi.core.remoting.ssl.OpenSSLContextFactory` in your jar and fill it with the full qualified name of your implementation.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static org.jboss.logging.Logger` | `log` |

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `default void` | `clearSslContexts()` | Release any cached `SslContext` instances.
    `default int` | `compareTo​(OpenSSLContextFactory other)` |
    `io.netty.handler.ssl.SslContext` | `getClientSslContext​(SSLContextConfig config, java.util.Map<java.lang.String,​java.lang.Object> additionalOpts)` |
    `int` | `getPriority()` | The priority for the `OpenSSLContextFactory` when resolving the service to get the implementation.
    `io.netty.handler.ssl.SslContext` | `getServerSslContext​(SSLContextConfig config, java.util.Map<java.lang.String,​java.lang.Object> additionalOpts)` |

- - ### Field Detail

    - #### log

          static final org.jboss.logging.Logger log

  - ### Method Detail

    - #### clearSslContexts

          default void clearSslContexts()

      Release any cached `SslContext` instances.

    - #### compareTo

          default int compareTo​(OpenSSLContextFactory other)

      Specified by:
        `compareTo` in interface `java.lang.Comparable<OpenSSLContextFactory>`

    - #### getClientSslContext

          io.netty.handler.ssl.SslContext getClientSslContext​(SSLContextConfig config,
                                                              java.util.Map<java.lang.String,​java.lang.Object> additionalOpts)
                                                       throws java.lang.Exception

      Parameters:
        `additionalOpts` - implementation specific additional options.
      Returns:
        an `SslContext` instance for the given configuration.
      Throws:
        `java.lang.Exception`

    - #### getServerSslContext

          io.netty.handler.ssl.SslContext getServerSslContext​(SSLContextConfig config,
                                                              java.util.Map<java.lang.String,​java.lang.Object> additionalOpts)
                                                       throws java.lang.Exception

      Parameters:
        `additionalOpts` - implementation specific additional options.
      Returns:
        an `SslContext` instance for the given configuration.
      Throws:
        `java.lang.Exception`

    - #### getPriority

          int getPriority()

      The priority for the `OpenSSLContextFactory` when resolving the service to get the implementation. This is used when selecting the implementation when several implementations are loaded. The highest priority implementation will be used.