org.apache.camel.processor.loadbalancer
Class FailOverLoadBalancer

java.lang.Object
  extended by org.apache.camel.impl.ServiceSupport
      extended by org.apache.camel.processor.loadbalancer.LoadBalancerSupport
          extended by org.apache.camel.processor.loadbalancer.FailOverLoadBalancer
All Implemented Interfaces:
Navigate<Processor>, Processor, LoadBalancer, Service

public class FailOverLoadBalancer
extends LoadBalancerSupport

This FailOverLoadBalancer will failover to use next processor when an exception occured


Constructor Summary
FailOverLoadBalancer()
           
FailOverLoadBalancer(List<Class> exceptions)
           
 
Method Summary
 void process(Exchange exchange)
          Processes the message exchange
protected  boolean shouldFailOver(Exchange exchange)
          Should the given failed Exchange failover?
 
Methods inherited from class org.apache.camel.processor.loadbalancer.LoadBalancerSupport
addProcessor, doStart, doStop, getProcessors, hasNext, next, removeProcessor
 
Methods inherited from class org.apache.camel.impl.ServiceSupport
addChildService, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, removeChildService, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FailOverLoadBalancer

public FailOverLoadBalancer()

FailOverLoadBalancer

public FailOverLoadBalancer(List<Class> exceptions)
Method Detail

shouldFailOver

protected boolean shouldFailOver(Exchange exchange)
Should the given failed Exchange failover?

Parameters:
exchange - the exchange that failed
Returns:
true to failover

process

public void process(Exchange exchange)
             throws Exception
Description copied from interface: Processor
Processes the message exchange

Parameters:
exchange - the message exchange
Throws:
Exception - if an internal processing error has occurred.


Copyright © 2009 Apache Software Foundation. All Rights Reserved.