Package org.apache.camel.support.jsse
Class KeyManagersParameters
- java.lang.Object
-
- org.apache.camel.support.jsse.JsseParameters
-
- org.apache.camel.support.jsse.KeyManagersParameters
-
- All Implemented Interfaces:
CamelContextAware
public class KeyManagersParameters extends JsseParameters
A representation of configuration options for creating and loadingKeyManagerinstance(s).
-
-
Field Summary
Fields Modifier and Type Field Description protected StringalgorithmThe optional algorithm name for theKeyManagerFactoryused to create theKeyManagers represented by this object's configuration.protected StringkeyPasswordThe optional password for recovering keys in the key store.protected KeyStoreParameterskeyStoreThe key store configuration used to create theKeyStoreParametersthat theKeyManagers produced by this object's configuration expose.protected StringproviderThe optional provider identifier for theKeyManagerFactoryused to create theKeyManagers represented by this object's configuration.
-
Constructor Summary
Constructors Constructor Description KeyManagersParameters()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description KeyManager[]createKeyManagers()CreatesKeyManagers based on this instance's configuration and theKeyStoreproduced by the configuration returned fromgetKeyStore().StringgetAlgorithm()StringgetKeyPassword()KeyStoreParametersgetKeyStore()StringgetProvider()voidsetAlgorithm(String value)Sets optional algorithm name for theKeyManagerFactoryused to create theKeyManagers represented by this object's configuration.voidsetKeyPassword(String value)Sets the optional password for recovering keys in the key store.voidsetKeyStore(KeyStoreParameters value)Sets the key store configuration used to create theKeyStorethat theKeyManagers produced by this object's configuration expose.voidsetProvider(String value)Sets the optional provider identifier for theKeyManagerFactoryused to create theKeyManagers represented by this object's configuration.StringtoString()-
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 theKeyStoreParametersthat theKeyManagers produced by this object's configuration expose.
-
keyPassword
protected String keyPassword
The optional password for recovering keys in the key store. Used by theKeyManagerFactorythat creates theKeyManagers represented by this object's configuration.
-
provider
protected String provider
The optional provider identifier for theKeyManagerFactoryused to create theKeyManagers represented by this object's configuration.
-
algorithm
protected String algorithm
The optional algorithm name for theKeyManagerFactoryused to create theKeyManagers represented by this object's configuration. See the Java Secure Socket Extension Reference Guide for information about standard algorithm names.
-
-
Method Detail
-
createKeyManagers
public KeyManager[] createKeyManagers() throws GeneralSecurityException, IOException
CreatesKeyManagers based on this instance's configuration and theKeyStoreproduced by the configuration returned fromgetKeyStore(). TheKeyManagers 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
KeyManagers - Throws:
GeneralSecurityException- if there is an error creating theKeyManagers or in creating theKeyStoreIOException- if there is an error loading theKeyStore- See Also:
KeyStoreParameters.createKeyStore()
-
getKeyStore
public KeyStoreParameters getKeyStore()
- See Also:
setKeyStore(KeyStoreParameters)
-
setKeyStore
public void setKeyStore(KeyStoreParameters value)
Sets the key store configuration used to create theKeyStorethat theKeyManagers produced by this object's configuration expose.- Parameters:
value- the configuration to use
-
getKeyPassword
public String getKeyPassword()
- See Also:
setKeyPassword(String)
-
setKeyPassword
public void setKeyPassword(String value)
Sets the optional password for recovering keys in the key store. Used by theKeyManagerFactorythat creates theKeyManagers represented by this object's configuration.- Parameters:
value- the value to use
-
getProvider
public String getProvider()
- See Also:
setProvider(String)
-
setProvider
public void setProvider(String value)
Sets the optional provider identifier for theKeyManagerFactoryused to create theKeyManagers represented by this object's configuration.- Parameters:
value- the desired provider identifier ornullto use the highest priority provider implementing the algorithm- See Also:
Security.getProviders()
-
getAlgorithm
public String getAlgorithm()
- See Also:
KeyManagerFactory.getDefaultAlgorithm()
-
setAlgorithm
public void setAlgorithm(String value)
Sets optional algorithm name for theKeyManagerFactoryused to create theKeyManagers 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 ornullto use default- See Also:
KeyManagerFactory.getDefaultAlgorithm()
-
-