org.apache.camel.model
Class ExpressionNode

java.lang.Object
  extended by org.apache.camel.model.OptionalIdentifiedDefinition<Type>
      extended by org.apache.camel.model.ProcessorDefinition<ExpressionNode>
          extended by org.apache.camel.model.ExpressionNode
All Implemented Interfaces:
Block, NamedNode
Direct Known Subclasses:
DelayDefinition, FilterDefinition, IdempotentConsumerDefinition, LoopDefinition, NoOutputExpressionNode, SplitDefinition, ThrottleDefinition, WhenDefinition

public class ExpressionNode
extends ProcessorDefinition<ExpressionNode>

A base class for nodes which contain an expression and a number of outputs

Version:

Field Summary
 
Fields inherited from class org.apache.camel.model.ProcessorDefinition
inheritErrorHandler, log
 
Constructor Summary
ExpressionNode()
           
ExpressionNode(Expression expression)
           
ExpressionNode(ExpressionDefinition expression)
           
ExpressionNode(Predicate predicate)
           
 
Method Summary
protected  void configureChild(ProcessorDefinition<?> output)
          Strategy for children to do any custom configuration
protected  FilterProcessor createFilterProcessor(RouteContext routeContext)
          Creates the FilterProcessor from the expression node.
protected  Predicate createPredicate(RouteContext routeContext)
          Creates the Predicate from the expression node.
 ExpressionDefinition getExpression()
           
 String getLabel()
          Returns a label to describe this node such as the expression if some kind of expression node
 List<ProcessorDefinition<?>> getOutputs()
           
 String getShortName()
          Returns a short name for this node which can be useful for ID generation or referring to related resources like images
 boolean isOutputSupported()
           
protected  void preCreateProcessor()
          Strategy to execute any custom logic before the Processor is created.
 void setExpression(ExpressionDefinition expression)
           
 void setOutputs(List<ProcessorDefinition<?>> outputs)
           
 
Methods inherited from class org.apache.camel.model.ProcessorDefinition
addInterceptStrategies, addInterceptStrategy, addOutput, addRoutes, aggregate, aggregate, aggregate, aggregate, aop, attribute, bean, bean, bean, bean, beanRef, beanRef, choice, clearOutput, convertBodyTo, convertBodyTo, createChannel, createChildProcessor, createCompositeProcessor, createOutputsProcessor, createOutputsProcessor, createProcessor, delay, delay, delay, doTry, dynamicRouter, dynamicRouter, end, endChoice, endDoTry, endParent, enrich, enrich, enrichRef, filter, filter, filter, filter, getInterceptStrategies, getNodeFactory, getOtherAttributes, getParent, id, idempotentConsumer, idempotentConsumer, idempotentConsumer, inheritErrorHandler, inOnly, inOnly, inOnly, inOnly, inOnly, inOnly, inOut, inOut, inOut, inOut, inOut, inOut, isAbstract, isInheritErrorHandler, loadBalance, loadBalance, log, log, log, log, loop, loop, loop, makeProcessor, markRollbackOnly, markRollbackOnlyLast, marshal, marshal, marshal, marshal, multicast, multicast, multicast, onCompletion, onException, onException, pipeline, pipeline, pipeline, pipeline, placeholder, policy, policy, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrichRef, process, processRef, recipientList, recipientList, recipientList, removeFaultHeader, removeHeader, removeHeaders, removeHeaders, removeProperty, resequence, resequence, resolveKnownConstantFields, resolvePropertyPlaceholders, rollback, rollback, routeId, routingSlip, routingSlip, routingSlip, routingSlip, routingSlip, routingSlip, routingSlip, sample, sample, sample, setBody, setBody, setExchangePattern, setFaultBody, setFaultHeader, setHeader, setHeader, setInheritErrorHandler, setNodeFactory, setOtherAttributes, setOutHeader, setOutHeader, setParent, setProperty, setProperty, sort, sort, sort, split, split, split, stop, threads, threads, threads, threads, throttle, throttle, throwException, to, to, to, to, to, to, to, to, to, to, toF, transacted, transacted, transform, transform, unmarshal, unmarshal, unmarshal, unmarshal, validate, validate, validate, wireTap, wireTap, wireTap, wireTap, wireTap, wireTap, wireTap, wrapChannel, wrapInErrorHandler, wrapProcessor
 
Methods inherited from class org.apache.camel.model.OptionalIdentifiedDefinition
description, getDescription, getDescriptionText, getId, hasCustomIdAssigned, idOrCreate, setDescription, setId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExpressionNode

public ExpressionNode()

ExpressionNode

public ExpressionNode(ExpressionDefinition expression)

ExpressionNode

public ExpressionNode(Expression expression)

ExpressionNode

public ExpressionNode(Predicate predicate)
Method Detail

getShortName

public String getShortName()
Description copied from class: OptionalIdentifiedDefinition
Returns a short name for this node which can be useful for ID generation or referring to related resources like images

Specified by:
getShortName in interface NamedNode
Overrides:
getShortName in class OptionalIdentifiedDefinition<ExpressionNode>
Returns:
defaults to "node" but derived nodes should overload this to provide a unique name

getExpression

public ExpressionDefinition getExpression()

setExpression

@Required
public void setExpression(ExpressionDefinition expression)

getOutputs

public List<ProcessorDefinition<?>> getOutputs()
Specified by:
getOutputs in class ProcessorDefinition<ExpressionNode>

setOutputs

public void setOutputs(List<ProcessorDefinition<?>> outputs)

isOutputSupported

public boolean isOutputSupported()
Specified by:
isOutputSupported in class ProcessorDefinition<ExpressionNode>

getLabel

public String getLabel()
Description copied from class: ProcessorDefinition
Returns a label to describe this node such as the expression if some kind of expression node

Overrides:
getLabel in class ProcessorDefinition<ExpressionNode>

createFilterProcessor

protected FilterProcessor createFilterProcessor(RouteContext routeContext)
                                         throws Exception
Creates the FilterProcessor from the expression node.

Parameters:
routeContext - the route context
Returns:
the created FilterProcessor
Throws:
Exception - is thrown if error creating the processor

createPredicate

protected Predicate createPredicate(RouteContext routeContext)
Creates the Predicate from the expression node.

Parameters:
routeContext - the route context
Returns:
the created predicate

configureChild

protected void configureChild(ProcessorDefinition<?> output)
Description copied from class: ProcessorDefinition
Strategy for children to do any custom configuration

Overrides:
configureChild in class ProcessorDefinition<ExpressionNode>
Parameters:
output - the child to be added as output to this

preCreateProcessor

protected void preCreateProcessor()
Description copied from class: ProcessorDefinition
Strategy to execute any custom logic before the Processor is created.

Overrides:
preCreateProcessor in class ProcessorDefinition<ExpressionNode>


Apache CAMEL