org.apache.camel
Class ChoiceProcessor<E>

java.lang.Object
  extended by org.apache.camel.ChoiceProcessor<E>
All Implemented Interfaces:
Processor<E>

public class ChoiceProcessor<E>
extends Object
implements Processor<E>

Implements a Choice structure where one or more predicates are used which if they are true their processors are used, with a default otherwise clause used if none match.

Version:
$Revision: 519941 $

Constructor Summary
ChoiceProcessor(List<FilterProcessor<E>> filters, Processor<E> otherwise)
           
 
Method Summary
 List<FilterProcessor<E>> getFilters()
           
 Processor<E> getOtherwise()
           
 void onExchange(E exchange)
          Processes the message exchange
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ChoiceProcessor

public ChoiceProcessor(List<FilterProcessor<E>> filters,
                       Processor<E> otherwise)
Method Detail

onExchange

public void onExchange(E exchange)
Description copied from interface: Processor
Processes the message exchange

Specified by:
onExchange in interface Processor<E>

toString

public String toString()
Overrides:
toString in class Object

getFilters

public List<FilterProcessor<E>> getFilters()

getOtherwise

public Processor<E> getOtherwise()


Copyright © 2007 Apache Software Foundation. All Rights Reserved.