Package org.apache.camel.spi
Interface SynchronizationVetoable
-
- All Superinterfaces:
Synchronization
public interface SynchronizationVetoable extends Synchronization
A vetoableSynchronization
. When usingSynchronization
they are normally executed when theExchange
complete at the end. If theExchange
is processed asynchronously theSynchronization
will be handed over to the next thread. This ensures for example the file consumer will delete the processed file at the very end, when theExchange
has been completed successfully. However there may be situations where you do not want to handover certainSynchronization
, such as when doing asynchronously request/reply over SEDA or VM endpoints.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
allowHandover()
Whether or not handover this synchronization is allowed.void
beforeHandover(Exchange target)
A method to perform optional housekeeping when a Synchronization is being handed over.-
Methods inherited from interface org.apache.camel.spi.Synchronization
onComplete, onFailure
-
-
-
-
Method Detail
-
allowHandover
boolean allowHandover()
Whether or not handover this synchronization is allowed. For example when anExchange
is being routed from one thread to another thread, such as using request/reply over SEDA- Returns:
- true to allow handover, false to deny.
-
beforeHandover
void beforeHandover(Exchange target)
A method to perform optional housekeeping when a Synchronization is being handed over.- Parameters:
target
- The Exchange to which the synchronizations are being transferred.
-
-