Package org.apache.camel.spi
Interface SynchronizationRouteAware
- All Superinterfaces:
Synchronization
An extended
Synchronization which is route aware.-
Method Summary
Modifier and TypeMethodDescriptionvoidonAfterRoute(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 Details
-
onBeforeRoute
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
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
-