Interface Synchronization

All Known Subinterfaces:
SynchronizationVetoable

public interface Synchronization
Provides a hook for custom Processor or Component instances to respond to completed or failed processing of an Exchange rather like Spring's TransactionSynchronization
  • Method Details

    • onComplete

      void onComplete(Exchange exchange)
      Called when the processing of the message exchange is complete
      Parameters:
      exchange - the exchange being processed
    • onFailure

      void onFailure(Exchange exchange)
      Called when the processing of the message exchange has failed for some reason. The exception which caused the problem is in Exchange.getException().
      Parameters:
      exchange - the exchange being processed
    • getRouteSynchronization

      default SynchronizationRouteAware getRouteSynchronization()
      Get an optional SynchronizationRouteAware for this synchronization
      Returns:
      An instance of SynchronizationRouteAware or null if unset for this synchronization