Class CompatibleSslContext
java.lang.Object
org.apache.activemq.broker.SslContext
org.apache.activemq.broker.CompatibleSslContext
An
SslContext that is API-compatible with ThreadLocalSslContext
but carries no ThreadLocal state.
This class exposes the same protected fields, list-based getters/setters,
and mutator methods that ThreadLocalSslContext does, so subclasses
(such as SpringSslContext) can be reparented onto this class without
any source or binary breakage.
The SSLContext is lazily created on first call to getSSLContext()
and can be replaced directly via setSSLContext(SSLContext).
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<KeyManager> protected Stringprotected Stringprotected SecureRandomprotected List<TrustManager> -
Constructor Summary
ConstructorsConstructorDescriptionCompatibleSslContext(KeyManager[] km, TrustManager[] tm, SecureRandom random) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidReturns a fully initialisedSSLContextready for use by transport factories.booleanbooleanvoidsetKeyManagers(List<KeyManager> keyManagers) voidsetProtocol(String protocol) voidsetProvider(String provider) voidsetSecureRandom(SecureRandom secureRandom) voidsetSSLContext(SSLContext sslContext) voidsetTrustManagers(List<TrustManager> trustManagers) Methods inherited from class SslContext
getCurrentSslContext, reload, setCurrentSslContext
-
Field Details
-
protocol
-
provider
-
keyManagers
-
trustManagers
-
secureRandom
-
-
Constructor Details
-
CompatibleSslContext
public CompatibleSslContext() -
CompatibleSslContext
-
-
Method Details
-
getKeyManagersAsArray
-
getTrustManagersAsArray
-
addKeyManager
-
removeKeyManager
-
addTrustManager
-
removeTrustManager
-
getKeyManagers
-
setKeyManagers
-
getTrustManagers
-
setTrustManagers
-
getSecureRandom
-
setSecureRandom
-
getProtocol
-
setProtocol
-
getProvider
-
setProvider
-
getSSLContext
public SSLContext getSSLContext() throws NoSuchProviderException, NoSuchAlgorithmException, KeyManagementExceptionDescription copied from class:SslContextReturns a fully initialisedSSLContextready for use by transport factories.- Specified by:
getSSLContextin classSslContext- Throws:
NoSuchProviderExceptionNoSuchAlgorithmExceptionKeyManagementException
-
setSSLContext
-