public class CachingSSLContextFactory extends DefaultSSLContextFactory
SSLContextFactory
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.SSLContextFactory
file with org.apache.activemq.artemis.core.remoting.impl.ssl.CachingSSLContextFactory
as value.log
Constructor and Description |
---|
CachingSSLContextFactory() |
Modifier and Type | Method and Description |
---|---|
void |
clearSSLContexts() |
protected Object |
getCacheKey(SSLContextConfig config,
Map<String,Object> additionalOpts)
Obtains/calculates a cache key for the corresponding
SslContext . |
int |
getPriority()
The priority for the SSLContextFactory when resolving the service to get the implementation.
|
SSLContext |
getSSLContext(SSLContextConfig config,
Map<String,Object> additionalOpts) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
compareTo, getSSLContext
public void clearSSLContexts()
public SSLContext getSSLContext(SSLContextConfig config, Map<String,Object> additionalOpts) throws Exception
getSSLContext
in interface SSLContextFactory
getSSLContext
in class DefaultSSLContextFactory
additionalOpts
- implementation specific additional options.SSLContext
for the given configuration.Exception
protected Object getCacheKey(SSLContextConfig config, Map<String,Object> additionalOpts)
SslContext
.
config
contains an entry with key "sslContext", the associated value is returned
SSLContextConfig
is used as cache key.
SslContext
.public int getPriority()
SSLContextFactory
getPriority
in interface SSLContextFactory
getPriority
in class DefaultSSLContextFactory
Copyright © 2021 JBoss by Red Hat. All rights reserved.