Package org.apache.camel.spi
Interface SynchronizationRouteAware
-
- All Superinterfaces:
Synchronization
public interface SynchronizationRouteAware extends Synchronization
An extendedSynchronizationwhich is route aware.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidonAfterRoute(Route route, Exchange exchange)Invoked after theExchangehas been routed by the given route.voidonBeforeRoute(Route route, Exchange exchange)Invoked before theExchangeis being routed by the given route.-
Methods inherited from interface org.apache.camel.spi.Synchronization
onComplete, onFailure
-
-
-
-
Method Detail
-
onBeforeRoute
void onBeforeRoute(Route route, Exchange exchange)
Invoked before theExchangeis being routed by the given route. Notice if the exchange is being routed through multiple routes, there will be callbacks for each route. Important: this callback may not invoked if theSynchronizationRouteAwareimplementation is being added to theUnitOfWorkafter the routing has started.- Parameters:
route- the routeexchange- the exchange
-
onAfterRoute
void onAfterRoute(Route route, Exchange exchange)
Invoked after theExchangehas been routed by the given route. Notice if the exchange is being routed through multiple routes, there will be callbacks for each route. This invocation happens before these callbacks:- The consumer of the route writes any response back to the caller (if in InOut mode)
- The UoW is done calling either
Synchronization.onComplete(org.apache.camel.Exchange)orSynchronization.onFailure(org.apache.camel.Exchange)
Consumerprepares and writes any data back to the caller (if in InOut mode).- Parameters:
route- the routeexchange- the exchange
-
-