org.apache.camel.processor.loadbalancer
Class FailOverLoadBalancer
java.lang.Object
org.apache.camel.impl.ServiceSupport
org.apache.camel.processor.loadbalancer.LoadBalancerSupport
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
Methods inherited from class org.apache.camel.impl.ServiceSupport |
addChildService, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, removeChildService, start, stop |
FailOverLoadBalancer
public FailOverLoadBalancer()
FailOverLoadBalancer
public FailOverLoadBalancer(List<Class> exceptions)
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.
prepareExchangeForFailover
protected void prepareExchangeForFailover(Exchange exchange)
- Prepares the exchange for failover
- Parameters:
exchange
- the exchange
toString
public String toString()
- Overrides:
toString
in class Object
Apache CAMEL