org.apache.camel.builder
Class ChoiceBuilder

java.lang.Object
  extended by org.apache.camel.builder.BuilderSupport
      extended by org.apache.camel.builder.FromBuilder
          extended by org.apache.camel.builder.ChoiceBuilder
All Implemented Interfaces:
ProcessorFactory

public class ChoiceBuilder
extends FromBuilder

Version:
$Revision: 532790 $

Field Summary
 
Fields inherited from class org.apache.camel.builder.FromBuilder
DEFAULT_TRACE_CATEGORY
 
Constructor Summary
ChoiceBuilder(FromBuilder parent)
           
 
Method Summary
 Processor createProcessor()
           
 FromBuilder getOtherwise()
           
 List<WhenBuilder> getPredicateBuilders()
           
 FromBuilder otherwise()
           
 WhenBuilder when(Predicate predicate)
          Adds a predicate which if it is true then the message exchange is sent to the given destination
 
Methods inherited from class org.apache.camel.builder.FromBuilder
addProcessBuilder, addProcessor, addProcessorBuilder, aggregator, aggregator, choice, convertBodyTo, convertOutBodyTo, createRoute, delayer, delayer, delayer, errorHandler, filter, getBuilder, getFrom, getProcessors, getRouteBuilder, idempotentConsumer, inheritErrorHandler, intercept, intercept, makeProcessor, pipeline, pipeline, pipeline, policies, policy, process, recipientList, resequencer, resequencer, resequencer, setBody, setHeader, setOutBody, setOutHeader, setProperty, setRouteBuilder, splitter, throttler, to, to, to, to, to, trace, trace, wrapInErrorHandler, wrapProcessor
 
Methods inherited from class org.apache.camel.builder.BuilderSupport
body, bodyAs, createErrorHandlerBuilder, deadLetterChannel, deadLetterChannel, deadLetterChannel, endpoint, endpoints, endpoints, getContext, getErrorHandlerBuilder, header, isInheritErrorHandler, loggingErrorHandler, loggingErrorHandler, loggingErrorHandler, loggingErrorHandler, noErrorHandler, outBody, outBody, setContext, setErrorHandlerBuilder, setInheritErrorHandler, systemProperty, systemProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChoiceBuilder

public ChoiceBuilder(FromBuilder parent)
Method Detail

when

public WhenBuilder when(Predicate predicate)
Adds a predicate which if it is true then the message exchange is sent to the given destination

Returns:
a builder for creating a when predicate clause and action

otherwise

public FromBuilder otherwise()

getPredicateBuilders

public List<WhenBuilder> getPredicateBuilders()

getOtherwise

public FromBuilder getOtherwise()

createProcessor

public Processor createProcessor()
                          throws Exception
Specified by:
createProcessor in interface ProcessorFactory
Overrides:
createProcessor in class FromBuilder
Throws:
Exception


Copyright © 2007 Apache Software Foundation. All Rights Reserved.