org.apache.camel.util.jsse
Class KeyManagersParameters

java.lang.Object
  extended by org.apache.camel.util.jsse.JsseParameters
      extended by org.apache.camel.util.jsse.KeyManagersParameters
All Implemented Interfaces:
CamelContextAware

public class KeyManagersParameters
extends JsseParameters

A representation of configuration options for creating and loading KeyManager instance(s).


Field Summary
protected  String algorithm
          The optional algorithm name for the KeyManagerFactory used to create the KeyManagers represented by this object's configuration.
protected  String keyPassword
          The optional password for recovering keys in the key store.
protected  KeyStoreParameters keyStore
          The key store configuration used to create the KeyStoreParameters that the KeyManagers produced by this object's configuration expose.
protected  String provider
          The optional provider identifier for the KeyManagerFactory used to create the KeyManagers represented by this object's configuration.
 
Constructor Summary
KeyManagersParameters()
           
 
Method Summary
 KeyManager[] createKeyManagers()
          Creates KeyManagers based on this instance's configuration and the KeyStore produced by the configuration returned from getKeyStore().
 String getAlgorithm()
           
 String getKeyPassword()
           
 KeyStoreParameters getKeyStore()
           
 String getProvider()
           
 void setAlgorithm(String value)
          Sets optional algorithm name for the KeyManagerFactory used to create the KeyManagers represented by this object's configuration.
 void setKeyPassword(String value)
          Sets the optional password for recovering keys in the key store.
 void setKeyStore(KeyStoreParameters value)
          Sets the key store configuration used to create the KeyStore that the KeyManagers produced by this object's configuration expose.
 void setProvider(String value)
          Sets the optional provider identifier for the KeyManagerFactory used to create the KeyManagers represented by this object's configuration.
 String toString()
           
 
Methods inherited from class org.apache.camel.util.jsse.JsseParameters
getCamelContext, parsePropertyValue, parsePropertyValues, resolveResource, setCamelContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

keyStore

protected KeyStoreParameters keyStore
The key store configuration used to create the KeyStoreParameters that the KeyManagers produced by this object's configuration expose.


keyPassword

protected String keyPassword
The optional password for recovering keys in the key store. Used by the KeyManagerFactory that creates the KeyManagers represented by this object's configuration.


provider

protected String provider
The optional provider identifier for the KeyManagerFactory used to create the KeyManagers represented by this object's configuration.


algorithm

protected String algorithm
The optional algorithm name for the KeyManagerFactory used to create the KeyManagers represented by this object's configuration. See the Java Secure Socket Extension Reference Guide for information about standard algorithm names.

Constructor Detail

KeyManagersParameters

public KeyManagersParameters()
Method Detail

createKeyManagers

public KeyManager[] createKeyManagers()
                               throws GeneralSecurityException,
                                      IOException
Creates KeyManagers based on this instance's configuration and the KeyStore produced by the configuration returned from getKeyStore(). The KeyManagers are produced from a factory created by using the provider and algorithm identifiers returned by getProvider() and getAlgorithm(), 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 the KeyManagers or in creating the KeyStore
IOException - if there is an error loading the KeyStore
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 the KeyStore that the KeyManagers 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 the KeyManagerFactory that creates the KeyManagers 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 the KeyManagerFactory used to create the KeyManagers represented by this object's configuration.

Parameters:
value - the desired provider identifier or null to 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 the KeyManagerFactory used to create the KeyManagers 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 or null to use default
See Also:
KeyManagerFactory.getDefaultAlgorithm()

toString

public String toString()
Overrides:
toString in class Object


Apache CAMEL