org.apache.camel.util.jsse
Class JsseParameters

java.lang.Object
  extended by org.apache.camel.util.jsse.JsseParameters
All Implemented Interfaces:
CamelContextAware
Direct Known Subclasses:
BaseSSLContextParameters, FilterParameters, KeyManagersParameters, KeyStoreParameters, SecureRandomParameters, TrustManagersParameters

public class JsseParameters
extends Object
implements CamelContextAware

Base class that provides optional integration with core Camel capabilities.


Constructor Summary
JsseParameters()
           
 
Method Summary
 CamelContext getCamelContext()
          Get the CamelContext
protected  String parsePropertyValue(String value)
          Parses the value using the Camel Property Placeholder capabilities if a context is provided.
protected  List<String> parsePropertyValues(List<String> values)
          Parses the values using the Camel Property Placeholder capabilities if a context is provided.
protected  InputStream resolveResource(String resource)
          Attempts to loads a resource using a number of different approaches.
 void setCamelContext(CamelContext context)
          Sets the optional CamelContext used for integration with core capabilities such as Camel Property Placeholders and ClassResolver.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JsseParameters

public JsseParameters()
Method Detail

getCamelContext

public CamelContext getCamelContext()
Description copied from interface: CamelContextAware
Get the CamelContext

Specified by:
getCamelContext in interface CamelContextAware
Returns:
camelContext the Camel context
See Also:
setCamelContext(CamelContext)

setCamelContext

public void setCamelContext(CamelContext context)
Sets the optional CamelContext used for integration with core capabilities such as Camel Property Placeholders and ClassResolver.

Specified by:
setCamelContext in interface CamelContextAware
Parameters:
context - the context to use

parsePropertyValue

protected String parsePropertyValue(String value)
                             throws RuntimeCamelException
Parses the value using the Camel Property Placeholder capabilities if a context is provided. Otherwise returns value as is.

Parameters:
value - the string to replace property tokens in
Returns:
the value
Throws:
RuntimeCamelException - if property placeholders were used and there was an error resolving them
See Also:
setCamelContext(CamelContext)

parsePropertyValues

protected List<String> parsePropertyValues(List<String> values)
                                    throws RuntimeCamelException
Parses the values using the Camel Property Placeholder capabilities if a context is provided. Otherwise returns values as is.

Parameters:
values - the list of strings to replace property tokens in
Returns:
the list of strings
Throws:
RuntimeCamelException - if property placeholders were used and there was an error resolving them
See Also:
parsePropertyValue(String)

resolveResource

protected InputStream resolveResource(String resource)
                               throws IOException
Attempts to loads a resource using a number of different approaches. The loading of the resource, is attempted by treating the resource as a file path, a class path resource, a URL, and using the Camel Context's ClassResolver if a context is available in that order. An exception is thrown if the resource cannot be resolved to readable input stream using any of the above methods.

Parameters:
resource - the resource location
Returns:
the input stream for the resource
Throws:
IOException - if the resource cannot be resolved using any of the above methods
See Also:
setCamelContext(CamelContext)


Apache CAMEL