Package org.apache.camel.support.jsse
Class TrustManagersParameters
- java.lang.Object
-
- org.apache.camel.support.jsse.JsseParameters
-
- org.apache.camel.support.jsse.TrustManagersParameters
-
- All Implemented Interfaces:
CamelContextAware
public class TrustManagersParameters extends JsseParameters
-
-
Field Summary
Fields Modifier and Type Field Description protected String
algorithm
The optional algorithm name for theTrustManagerFactory
used to create theTrustManager
s represented by this object's configuration.protected KeyStoreParameters
keyStore
The key store configuration used to create theKeyStoreParameters
that theTrustManager
s produced by this object's configuration expose.protected String
provider
The optional provider identifier for theTrustManagerFactory
used to create theTrustManager
s represented by this object's configuration.protected TrustManager
trustManager
To use a existing configured trust manager instead of usingTrustManagerFactory
to get theTrustManager
.
-
Constructor Summary
Constructors Constructor Description TrustManagersParameters()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TrustManager[]
createTrustManagers()
CreatesTrustManager
s based on this instance's configuration and theKeyStore
produced by the configuration returned fromgetKeyStore()
.String
getAlgorithm()
KeyStoreParameters
getKeyStore()
String
getProvider()
TrustManager
getTrustManager()
void
setAlgorithm(String value)
Sets optional algorithm name for theTrustManagerFactory
used to create theTrustManager
s represented by this object's configuration.void
setKeyStore(KeyStoreParameters value)
Sets the key store configuration used to create theKeyStoreParameters
that theTrustManager
s produced by this object's configuration expose.void
setProvider(String value)
Sets the optional provider identifier for theTrustManagerFactory
used to create theTrustManager
s represented by this object's configuration.void
setTrustManager(TrustManager trustManager)
To use a existing configured trust manager instead of usingTrustManagerFactory
to get theTrustManager
.String
toString()
-
Methods inherited from class org.apache.camel.support.jsse.JsseParameters
getCamelContext, parsePropertyValue, parsePropertyValues, resolveResource, setCamelContext
-
-
-
-
Field Detail
-
keyStore
protected KeyStoreParameters keyStore
The key store configuration used to create theKeyStoreParameters
that theTrustManager
s produced by this object's configuration expose.
-
provider
protected String provider
The optional provider identifier for theTrustManagerFactory
used to create theTrustManager
s represented by this object's configuration.
-
algorithm
protected String algorithm
The optional algorithm name for theTrustManagerFactory
used to create theTrustManager
s represented by this object's configuration. See the Java Secure Socket Extension Reference Guide for information about standard algorithm names.
-
trustManager
protected TrustManager trustManager
To use a existing configured trust manager instead of usingTrustManagerFactory
to get theTrustManager
.
-
-
Method Detail
-
createTrustManagers
public TrustManager[] createTrustManagers() throws GeneralSecurityException, IOException
CreatesTrustManager
s based on this instance's configuration and theKeyStore
produced by the configuration returned fromgetKeyStore()
. TheKeyManager
s are produced from a factory created by using the provider and algorithm identifiers returned bygetProvider()
andgetAlgorithm()
, respectively. If either of these methods returns null, the default JSSE value is used instead.- Returns:
- the initialized
TrustManager
s - Throws:
GeneralSecurityException
- if there is an error creating theTrustManagers
s or in creating theKeyStore
IOException
- if there is an error loading theKeyStore
- See Also:
KeyStoreParameters.createKeyStore()
-
getKeyStore
public KeyStoreParameters getKeyStore()
-
setKeyStore
public void setKeyStore(KeyStoreParameters value)
Sets the key store configuration used to create theKeyStoreParameters
that theTrustManager
s produced by this object's configuration expose.- Parameters:
value
- the configuration to use
-
getProvider
public String getProvider()
-
setProvider
public void setProvider(String value)
Sets the optional provider identifier for theTrustManagerFactory
used to create theTrustManager
s represented by this object's configuration.- Parameters:
value
- the desired provider identifier ornull
to use the highest priority provider implementing the algorithm- See Also:
Security.getProviders()
-
getAlgorithm
public String getAlgorithm()
-
setAlgorithm
public void setAlgorithm(String value)
Sets optional algorithm name for theTrustManagerFactory
used to create theTrustManager
s represented by this object's configuration. See the Java Secure Socket Extension Reference Guide for information about standard algorithm names.- Parameters:
value
- the desired algorithm ornull
to use default- See Also:
TrustManagerFactory.getDefaultAlgorithm()
-
getTrustManager
public TrustManager getTrustManager()
-
setTrustManager
public void setTrustManager(TrustManager trustManager)
To use a existing configured trust manager instead of usingTrustManagerFactory
to get theTrustManager
.
-
-