Package org.apache.camel.spi
Interface SynchronizationRouteAware
public interface SynchronizationRouteAware
An extension to
Synchronization
which provides route awareness capabilities.-
Method Summary
Modifier and TypeMethodDescriptionvoid
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.
-
Method Details
-
onBeforeRoute
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
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
-