Package org.apache.camel.spi
Interface SynchronizationRouteAware
-
- All Superinterfaces:
Synchronization
public interface SynchronizationRouteAware extends Synchronization
An extendedSynchronization
which is route aware.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
onAfterRoute(Route route, Exchange exchange)
Invoked after theExchange
has been routed by the given route.void
onBeforeRoute(Route route, Exchange exchange)
Invoked before theExchange
is 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 theExchange
is 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 theSynchronizationRouteAware
implementation is being added to theUnitOfWork
after the routing has started.- Parameters:
route
- the routeexchange
- the exchange
-
onAfterRoute
void onAfterRoute(Route route, Exchange exchange)
Invoked after theExchange
has 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)
Consumer
prepares and writes any data back to the caller (if in InOut mode).- Parameters:
route
- the routeexchange
- the exchange
-
-