Class DefaultUnitOfWork

java.lang.Object
org.apache.camel.impl.engine.DefaultUnitOfWork
All Implemented Interfaces:
org.apache.camel.spi.UnitOfWork
Direct Known Subclasses:
MDCUnitOfWork

public class DefaultUnitOfWork extends Object implements org.apache.camel.spi.UnitOfWork
The default implementation of UnitOfWork
  • Field Summary

    Fields inherited from interface org.apache.camel.spi.UnitOfWork

    MDC_BREADCRUMB_ID, MDC_CAMEL_CONTEXT_ID, MDC_CORRELATION_ID, MDC_EXCHANGE_ID, MDC_MESSAGE_ID, MDC_ROUTE_ID, MDC_STEP_ID, MDC_TRANSACTION_KEY
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
     
    DefaultUnitOfWork(org.apache.camel.Exchange exchange)
     
     
    DefaultUnitOfWork(org.apache.camel.Exchange exchange, org.apache.camel.spi.InflightRepository inflightRepository, boolean allowUseOriginalMessage, boolean useBreadcrumb)
     
    protected
    DefaultUnitOfWork(org.apache.camel.Exchange exchange, org.slf4j.Logger logger, org.apache.camel.spi.InflightRepository inflightRepository, boolean allowUseOriginalMessage, boolean useBreadcrumb)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addSynchronization(org.apache.camel.spi.Synchronization synchronization)
     
    void
    afterProcess(org.apache.camel.Processor processor, org.apache.camel.Exchange exchange, org.apache.camel.AsyncCallback callback, boolean doneSync)
     
    void
    afterRoute(org.apache.camel.Exchange exchange, org.apache.camel.Route route)
     
    org.apache.camel.AsyncCallback
    beforeProcess(org.apache.camel.Processor processor, org.apache.camel.Exchange exchange, org.apache.camel.AsyncCallback callback)
     
    void
    beforeRoute(org.apache.camel.Exchange exchange, org.apache.camel.Route route)
     
    void
     
    boolean
    containsSynchronization(org.apache.camel.spi.Synchronization synchronization)
     
    org.apache.camel.spi.UnitOfWork
    createChildUnitOfWork(org.apache.camel.Exchange childExchange)
     
    void
    done(org.apache.camel.Exchange exchange)
     
    void
     
    org.apache.camel.Message
     
    org.apache.camel.Route
     
    void
    handoverSynchronization(org.apache.camel.Exchange target)
     
    void
    handoverSynchronization(org.apache.camel.Exchange target, Predicate<org.apache.camel.spi.Synchronization> filter)
     
    boolean
     
    boolean
     
    boolean
     
    protected void
     
    boolean
    onPrepare(org.apache.camel.Exchange exchange)
     
    org.apache.camel.Route
     
    void
    pushRoute(org.apache.camel.Route route)
     
    void
    removeSynchronization(org.apache.camel.spi.Synchronization synchronization)
     
    void
     
    int
     
    int
    routeStackLevel(boolean includeRouteTemplate, boolean includeKamelet)
     
    void
    setParentUnitOfWork(org.apache.camel.spi.UnitOfWork parentUnitOfWork)
     
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • DefaultUnitOfWork

      public DefaultUnitOfWork(org.apache.camel.Exchange exchange)
    • DefaultUnitOfWork

      protected DefaultUnitOfWork(org.apache.camel.Exchange exchange, org.slf4j.Logger logger, org.apache.camel.spi.InflightRepository inflightRepository, boolean allowUseOriginalMessage, boolean useBreadcrumb)
    • DefaultUnitOfWork

      public DefaultUnitOfWork(org.apache.camel.Exchange exchange, org.apache.camel.spi.InflightRepository inflightRepository, boolean allowUseOriginalMessage, boolean useBreadcrumb)
  • Method Details

    • onPrepare

      public boolean onPrepare(org.apache.camel.Exchange exchange)
      Specified by:
      onPrepare in interface org.apache.camel.spi.UnitOfWork
    • reset

      public void reset()
      Specified by:
      reset in interface org.apache.camel.spi.UnitOfWork
    • setParentUnitOfWork

      public void setParentUnitOfWork(org.apache.camel.spi.UnitOfWork parentUnitOfWork)
      Specified by:
      setParentUnitOfWork in interface org.apache.camel.spi.UnitOfWork
    • createChildUnitOfWork

      public org.apache.camel.spi.UnitOfWork createChildUnitOfWork(org.apache.camel.Exchange childExchange)
      Specified by:
      createChildUnitOfWork in interface org.apache.camel.spi.UnitOfWork
    • addSynchronization

      public void addSynchronization(org.apache.camel.spi.Synchronization synchronization)
      Specified by:
      addSynchronization in interface org.apache.camel.spi.UnitOfWork
    • removeSynchronization

      public void removeSynchronization(org.apache.camel.spi.Synchronization synchronization)
      Specified by:
      removeSynchronization in interface org.apache.camel.spi.UnitOfWork
    • containsSynchronization

      public boolean containsSynchronization(org.apache.camel.spi.Synchronization synchronization)
      Specified by:
      containsSynchronization in interface org.apache.camel.spi.UnitOfWork
    • handoverSynchronization

      public void handoverSynchronization(org.apache.camel.Exchange target)
      Specified by:
      handoverSynchronization in interface org.apache.camel.spi.UnitOfWork
    • handoverSynchronization

      public void handoverSynchronization(org.apache.camel.Exchange target, Predicate<org.apache.camel.spi.Synchronization> filter)
      Specified by:
      handoverSynchronization in interface org.apache.camel.spi.UnitOfWork
    • done

      public void done(org.apache.camel.Exchange exchange)
      Specified by:
      done in interface org.apache.camel.spi.UnitOfWork
    • onDone

      protected void onDone()
    • beforeRoute

      public void beforeRoute(org.apache.camel.Exchange exchange, org.apache.camel.Route route)
      Specified by:
      beforeRoute in interface org.apache.camel.spi.UnitOfWork
    • afterRoute

      public void afterRoute(org.apache.camel.Exchange exchange, org.apache.camel.Route route)
      Specified by:
      afterRoute in interface org.apache.camel.spi.UnitOfWork
    • getOriginalInMessage

      public org.apache.camel.Message getOriginalInMessage()
      Specified by:
      getOriginalInMessage in interface org.apache.camel.spi.UnitOfWork
    • isTransacted

      public boolean isTransacted()
      Specified by:
      isTransacted in interface org.apache.camel.spi.UnitOfWork
    • isTransactedBy

      public boolean isTransactedBy(Object key)
      Specified by:
      isTransactedBy in interface org.apache.camel.spi.UnitOfWork
    • beginTransactedBy

      public void beginTransactedBy(Object key)
      Specified by:
      beginTransactedBy in interface org.apache.camel.spi.UnitOfWork
    • endTransactedBy

      public void endTransactedBy(Object key)
      Specified by:
      endTransactedBy in interface org.apache.camel.spi.UnitOfWork
    • getRoute

      public org.apache.camel.Route getRoute()
      Specified by:
      getRoute in interface org.apache.camel.spi.UnitOfWork
    • pushRoute

      public void pushRoute(org.apache.camel.Route route)
      Specified by:
      pushRoute in interface org.apache.camel.spi.UnitOfWork
    • popRoute

      public org.apache.camel.Route popRoute()
      Specified by:
      popRoute in interface org.apache.camel.spi.UnitOfWork
    • routeStackLevel

      public int routeStackLevel()
      Specified by:
      routeStackLevel in interface org.apache.camel.spi.UnitOfWork
    • routeStackLevel

      public int routeStackLevel(boolean includeRouteTemplate, boolean includeKamelet)
      Specified by:
      routeStackLevel in interface org.apache.camel.spi.UnitOfWork
    • isBeforeAfterProcess

      public boolean isBeforeAfterProcess()
      Specified by:
      isBeforeAfterProcess in interface org.apache.camel.spi.UnitOfWork
    • beforeProcess

      public org.apache.camel.AsyncCallback beforeProcess(org.apache.camel.Processor processor, org.apache.camel.Exchange exchange, org.apache.camel.AsyncCallback callback)
      Specified by:
      beforeProcess in interface org.apache.camel.spi.UnitOfWork
    • afterProcess

      public void afterProcess(org.apache.camel.Processor processor, org.apache.camel.Exchange exchange, org.apache.camel.AsyncCallback callback, boolean doneSync)
      Specified by:
      afterProcess in interface org.apache.camel.spi.UnitOfWork
    • toString

      public String toString()
      Overrides:
      toString in class Object