org.apache.camel.support
Class LanguageSupport
java.lang.Object
org.apache.camel.support.LanguageSupport
- All Implemented Interfaces:
- CamelContextAware, IsSingleton, Language
- Direct Known Subclasses:
- SimpleLanguage, XPathLanguage
public abstract class LanguageSupport
- extends Object
- implements Language, IsSingleton, CamelContextAware
Base language for Language
implementations.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RESOURCE
public static final String RESOURCE
- See Also:
- Constant Field Values
LanguageSupport
public LanguageSupport()
getCamelContext
public CamelContext getCamelContext()
- Description copied from interface:
CamelContextAware
- Get the
CamelContext
- Specified by:
getCamelContext
in interface CamelContextAware
- Returns:
- camelContext the Camel context
setCamelContext
public void setCamelContext(CamelContext camelContext)
- Description copied from interface:
CamelContextAware
- Injects the
CamelContext
- Specified by:
setCamelContext
in interface CamelContextAware
- Parameters:
camelContext
- the Camel context
isSingleton
public boolean isSingleton()
- Description copied from interface:
IsSingleton
- Whether this class supports being singleton or not.
- Specified by:
isSingleton
in interface IsSingleton
- Returns:
- true to be a single shared instance, false to create new instances.
loadResource
protected String loadResource(String expression)
throws ExpressionIllegalSyntaxException
- Loads the resource if the given expression is referring to an external resource by using
the syntax resource:scheme:uri.
If the expression is not referring to a resource, then its returned as is.
For example resource:classpath:mygroovy.groovy to refer to a groovy script on the classpath.
- Parameters:
expression
- the expression
- Returns:
- the expression
- Throws:
ExpressionIllegalSyntaxException
- is thrown if error loading the resource
Apache Camel