Package org.apache.camel.support.jsse
Class KeyStoreParameters
java.lang.Object
org.apache.camel.support.jsse.JsseParameters
org.apache.camel.support.jsse.KeyStoreParameters
- All Implemented Interfaces:
CamelContextAware
,HasCamelContext
A representation of configuration options for creating and loading a
KeyStore
instance.-
Field Summary
Modifier and TypeFieldDescriptionprotected KeyStore
The optional key store, which has higher priority then value in resource below.protected String
The optional password for reading/opening/verifying the key store.protected String
The optional provider identifier for instantiating the key store.protected String
The optional file path, class path resource, or URL of the resource used to load the key store.protected String
The optional type of the key store to load. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionCreates aKeyStoreParameters
instance based off of the configuration state of this instance.getType()
void
setKeyStore
(KeyStore keyStore) Sets the optional key store, which has higher priority then value in resource.void
setPassword
(String value) Set the optional password for reading/opening/verifying the key store.void
setProvider
(String value) Sets the optional provider identifier for instantiating the key store.void
setResource
(String value) Sets the optional file path, class path resource, or URL of the resource used to load the key store.void
Sets the type of the key store to create and load.toString()
Methods inherited from class org.apache.camel.support.jsse.JsseParameters
getCamelContext, parsePropertyValue, parsePropertyValues, resolveResource, setCamelContext
-
Field Details
-
type
The optional type of the key store to load. See Appendix A in the Java Cryptography Architecture Standard Algorithm Name Documentation for more information on standard names. -
password
The optional password for reading/opening/verifying the key store. -
provider
The optional provider identifier for instantiating the key store. -
keyStore
The optional key store, which has higher priority then value in resource below. If keyStore is non-null, resource isn't taken into account. This is helpful say for in-memory KeyStore composed by the user "on the fly". -
resource
The optional file path, class path resource, or URL of the resource used to load the key store.
-
-
Constructor Details
-
KeyStoreParameters
public KeyStoreParameters()
-
-
Method Details
-
getType
- See Also:
-
setType
Sets the type of the key store to create and load. See Appendix A in the Java Cryptography Architecture Standard Algorithm Name Documentation for more information on standard names.- Parameters:
value
- the key store type identifier (may benull
)
-
getPassword
- See Also:
-
setPassword
Set the optional password for reading/opening/verifying the key store.- Parameters:
value
- the password value (may benull
)
-
getProvider
- See Also:
-
setProvider
Sets the optional provider identifier for instantiating the key store.- Parameters:
value
- the provider identifier (may benull
)- See Also:
-
getResource
- See Also:
-
setResource
Sets the optional file path, class path resource, or URL of the resource used to load the key store.- Parameters:
value
- the resource (may benull
)
-
setKeyStore
Sets the optional key store, which has higher priority then value in resource. NB Don't forget to call setPassword() for password of this KeyStore.- Parameters:
keyStore
- the KeyStore (may benull
)
-
createKeyStore
Creates aKeyStoreParameters
instance based off of the configuration state of this instance. IfgetType()
returnsnull
, the default key store type is loaded, otherwise the type will be of that specified. The created instance will always be loaded, but if the type requires an input stream andgetResource()
returnsnull
, the instance will be empty. The loading of the resource, if notnull
, is attempted by treating the resource as a file path, a class path resource, and a URL in that order. An exception is thrown if the resource cannot be resolved to readable input stream using any of the above methods.- Returns:
- a configured and loaded key store
- Throws:
GeneralSecurityException
- if there is an error creating an instance with the given configurationIOException
- if there is an error resolving the configured resource to an input stream
-
toString
-