public class CachingOpenSSLContextFactory extends DefaultOpenSSLContextFactory
OpenSSLContextFactory
providing a cache of SslContext
.
Since SslContext
should be reused instead of recreated and are thread safe.
To activate it you need to allow this Service to be discovered by having a
META-INF/services/org.apache.activemq.artemis.spi.core.remoting.ssl.OpenSSLContextFactory
file with org.apache.activemq.artemis.core.remoting.impl.ssl.CachingOpenSSLContextFactory
as value.log
Constructor and Description |
---|
CachingOpenSSLContextFactory() |
Modifier and Type | Method and Description |
---|---|
void |
clearSslContexts()
Release any cached
SslContext instances. |
io.netty.handler.ssl.SslContext |
getClientSslContext(SSLContextConfig config,
Map<String,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,
Map<String,Object> additionalOpts) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
compareTo
public void clearSslContexts()
OpenSSLContextFactory
SslContext
instances.public io.netty.handler.ssl.SslContext getClientSslContext(SSLContextConfig config, Map<String,Object> additionalOpts) throws Exception
getClientSslContext
in interface OpenSSLContextFactory
getClientSslContext
in class DefaultOpenSSLContextFactory
additionalOpts
- not used by this implementationSslContext
instance for the given configuration.Exception
public io.netty.handler.ssl.SslContext getServerSslContext(SSLContextConfig config, Map<String,Object> additionalOpts) throws Exception
getServerSslContext
in interface OpenSSLContextFactory
getServerSslContext
in class DefaultOpenSSLContextFactory
additionalOpts
- not used by this implementationSslContext
instance for the given configuration.Exception
public int getPriority()
OpenSSLContextFactory
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.getPriority
in interface OpenSSLContextFactory
getPriority
in class DefaultOpenSSLContextFactory
Copyright © 2021 JBoss by Red Hat. All rights reserved.