org.apache.camel.language.simple
Class SimpleLanguage
java.lang.Object
org.apache.camel.language.simple.SimpleLanguageSupport
org.apache.camel.language.simple.SimpleLanguage
- All Implemented Interfaces:
- IsSingleton, Language
public class SimpleLanguage
- extends SimpleLanguageSupport
A simple language
which maps simple property style notations to access headers and bodies.
Examples of supported expressions are:
- id to access the inbound message id
- in.body or body to access the inbound body
- out.body to access the inbound body
- in.header.foo or header.foo to access an inbound header called 'foo'
- out.header.foo to access an outbound header called 'foo'
- property.foo to access the exchange property called 'foo'
- sys.foo to access the system property called 'foo'
- exception.messsage to access the exception message
- date:<command>:<pattern> for date formatting using the
SimpleDateFormat
patterns.
Supported commands are: now for current timestamp,
in.header.xxx or header.xxx to use the Date object in the in header.
out.header.xxx to use the Date object in the out header.
- bean:<bean expression> to invoke a bean using the
BeanLanguage
- Version:
- $Revision: 772927 $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleLanguage
public SimpleLanguage()
simple
public static Expression simple(String expression)
createSimpleExpression
protected Expression createSimpleExpression(String expression,
boolean strict)
- Description copied from class:
SimpleLanguageSupport
- Creates the simple expression based on the extracted content from the ${ } place holders
- Specified by:
createSimpleExpression
in class SimpleLanguageSupport
- Parameters:
expression
- the content between ${ and }strict
- whether it is strict mode or not, if strict it will throw a
ExpressionIllegalSyntaxException
if the expression was not known.
Set to false to support constant expressions
- Returns:
- the expression
isSingleton
public boolean isSingleton()
- Description copied from interface:
IsSingleton
- Wheter this class supports being singleton or not.
- Returns:
- true to be a single shared instance, false to create new instances.
Apache CAMEL