org.apache.camel.processor
Class CamelInternalProcessor.RoutePolicyAdvice

java.lang.Object
  extended by org.apache.camel.processor.CamelInternalProcessor.RoutePolicyAdvice
All Implemented Interfaces:
CamelInternalProcessorAdvice
Enclosing class:
CamelInternalProcessor

public static class CamelInternalProcessor.RoutePolicyAdvice
extends Object
implements CamelInternalProcessorAdvice

Advice to execute any RoutePolicy a route may have been configured with.


Constructor Summary
CamelInternalProcessor.RoutePolicyAdvice(List<RoutePolicy> routePolicies)
           
 
Method Summary
 void after(Exchange exchange, Object data)
          Callback executed after processing a step in the route.
 Object before(Exchange exchange)
          Callback executed before processing a step in the route.
protected  boolean isRoutePolicyRunAllowed(RoutePolicy policy)
          Strategy to determine if this policy is allowed to run
 void setRoute(Route route)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CamelInternalProcessor.RoutePolicyAdvice

public CamelInternalProcessor.RoutePolicyAdvice(List<RoutePolicy> routePolicies)
Method Detail

setRoute

public void setRoute(Route route)

isRoutePolicyRunAllowed

protected boolean isRoutePolicyRunAllowed(RoutePolicy policy)
Strategy to determine if this policy is allowed to run

Parameters:
policy - the policy
Returns:
true to run

before

public Object before(Exchange exchange)
              throws Exception
Description copied from interface: CamelInternalProcessorAdvice
Callback executed before processing a step in the route.

Specified by:
before in interface CamelInternalProcessorAdvice
Parameters:
exchange - the current exchange
Returns:
any state to keep and provide as data to the CamelInternalProcessorAdvice.after(org.apache.camel.Exchange, Object) method, or use null for no state.
Throws:
Exception - is thrown if error during the call.

after

public void after(Exchange exchange,
                  Object data)
           throws Exception
Description copied from interface: CamelInternalProcessorAdvice
Callback executed after processing a step in the route.

Specified by:
after in interface CamelInternalProcessorAdvice
Parameters:
exchange - the current exchange
data - the state, if any, returned in the CamelInternalProcessorAdvice.before(org.apache.camel.Exchange) method.
Throws:
Exception - is thrown if error during the call.


Apache Camel