|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.camel.util.jsse.JsseParameters org.apache.camel.util.jsse.KeyStoreParameters
public class KeyStoreParameters
A representation of configuration options for creating and loading a
KeyStore
instance.
Field Summary | |
---|---|
protected String |
password
The optional password for reading/opening/verifying the key store. |
protected String |
provider
The optional provider identifier for instantiating the key store. |
protected String |
resource
The optional file path, class path resource, or URL of the resource used to load the key store. |
protected String |
type
The optional type of the key store to load. |
Constructor Summary | |
---|---|
KeyStoreParameters()
|
Method Summary | |
---|---|
KeyStore |
createKeyStore()
Creates a KeyStoreParameters instance based off of the configuration state
of this instance. |
String |
getPassword()
|
String |
getProvider()
|
String |
getResource()
|
String |
getType()
|
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 |
setType(String value)
Sets the type of the key store to create and load. |
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 |
---|
protected String type
protected String password
protected String provider
protected String resource
Constructor Detail |
---|
public KeyStoreParameters()
Method Detail |
---|
public String getType()
setType(String)
public void setType(String value)
value
- the key store type identifier (may be null
)public String getPassword()
getPassword()
public void setPassword(String value)
value
- the password value (may be null
)public String getProvider()
setProvider(String)
public void setProvider(String value)
value
- the provider identifier (may be null
)Security.getProviders()
public String getResource()
getResource()
public void setResource(String value)
value
- the resource (may be null
)public KeyStore createKeyStore() throws GeneralSecurityException, IOException
KeyStoreParameters
instance based off of the configuration state
of this instance. If getType()
returns null
, 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 and getResource()
returns null
, the
instance will be empty. The loading of the resource, if not null
,
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.
GeneralSecurityException
- if there is an error creating an instance
with the given configuration
IOException
- if there is an error resolving the configured
resource to an input streampublic String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |