public class SynchronizationAdapter extends Object implements SynchronizationVetoable, Ordered, SynchronizationRouteAware
Synchronization adapter with empty methods for easier overriding
of single methods.| Constructor and Description |
|---|
SynchronizationAdapter() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
allowHandover()
Whether or not handover this synchronization is allowed.
|
int |
getOrder()
Gets the order.
|
void |
onAfterRoute(Route route,
Exchange exchange)
Invoked after the
Exchange has been routed by the given route. |
void |
onBeforeRoute(Route route,
Exchange exchange)
Invoked before the
Exchange is being routed by the given route. |
void |
onComplete(Exchange exchange)
Called when the processing of the message exchange is complete
|
void |
onDone(Exchange exchange) |
void |
onFailure(Exchange exchange)
Called when the processing of the message exchange has failed for some reason.
|
public void onComplete(Exchange exchange)
SynchronizationonComplete in interface Synchronizationexchange - the exchange being processedpublic void onFailure(Exchange exchange)
SynchronizationExchange.getException() and
there could be a fault message via Message.isFault()onFailure in interface Synchronizationexchange - the exchange being processedpublic void onDone(Exchange exchange)
public boolean allowHandover()
SynchronizationVetoableExchange is being routed
from one thread to another thread, such as using request/reply over SEDAallowHandover in interface SynchronizationVetoablepublic int getOrder()
OrderedInteger.MAX_VALUE or eg Ordered.LOWEST.public void onBeforeRoute(Route route, Exchange exchange)
SynchronizationRouteAwareExchange 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 the SynchronizationRouteAware implementation
is being added to the UnitOfWork after the routing has started.onBeforeRoute in interface SynchronizationRouteAwareroute - the routeexchange - the exchangepublic void onAfterRoute(Route route, Exchange exchange)
SynchronizationRouteAwareExchange 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:
Synchronization.onComplete(org.apache.camel.Exchange) or Synchronization.onFailure(org.apache.camel.Exchange)Consumer prepares and writes
any data back to the caller (if in InOut mode).onAfterRoute in interface SynchronizationRouteAwareroute - the routeexchange - the exchangeApache Camel