org.apache.camel.language.simple
Class AbstractSimpleLanguage

java.lang.Object
  extended by org.apache.camel.language.simple.AbstractSimpleLanguage
All Implemented Interfaces:
Language
Direct Known Subclasses:
FileLanguage, SimpleLanguage

public abstract class AbstractSimpleLanguage
extends Object
implements Language

Abstract base class for Simple languages.


Constructor Summary
AbstractSimpleLanguage()
           
 
Method Summary
protected  Expression<Exchange> createComplexExpression(String expression)
           
protected  Expression createConstantExpression(String expression, int start, int end)
           
 Expression<Exchange> createExpression(String expression)
          Creates an expression based on the given string input
 Predicate<Exchange> createPredicate(String expression)
          Creates a predicate based on the given string input
protected abstract
<E extends Exchange>
Expression<Exchange>
createSimpleExpression(String expression)
          Creates the simple expression based on the extracted content from the ${ } place holders
protected  String ifStartsWithReturnRemainder(String prefix, String text)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractSimpleLanguage

public AbstractSimpleLanguage()
Method Detail

createPredicate

public Predicate<Exchange> createPredicate(String expression)
Description copied from interface: Language
Creates a predicate based on the given string input

Specified by:
createPredicate in interface Language
Parameters:
expression - the expression
Returns:
the created predicate

createExpression

public Expression<Exchange> createExpression(String expression)
Description copied from interface: Language
Creates an expression based on the given string input

Specified by:
createExpression in interface Language
Parameters:
expression - the expression as a string input
Returns:
the created expression

createComplexExpression

protected Expression<Exchange> createComplexExpression(String expression)

createConstantExpression

protected Expression createConstantExpression(String expression,
                                              int start,
                                              int end)

createSimpleExpression

protected abstract <E extends Exchange> Expression<Exchange> createSimpleExpression(String expression)
Creates the simple expression based on the extracted content from the ${ } place holders

Parameters:
expression - the content between ${ and }
Returns:
the expression

ifStartsWithReturnRemainder

protected String ifStartsWithReturnRemainder(String prefix,
                                             String text)


Copyright © 2008 IONA Open Source Community. All Rights Reserved.