Class MDCUnitOfWork

java.lang.Object
org.apache.camel.impl.engine.DefaultUnitOfWork
org.apache.camel.impl.engine.MDCUnitOfWork
All Implemented Interfaces:
AutoCloseable, org.apache.camel.Service, org.apache.camel.spi.UnitOfWork

public class MDCUnitOfWork extends DefaultUnitOfWork implements org.apache.camel.Service
This unit of work supports MDC.
  • Constructor Details

    • MDCUnitOfWork

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

    • prepareMDC

      protected void prepareMDC(org.apache.camel.Exchange exchange)
    • newInstance

      public org.apache.camel.spi.UnitOfWork newInstance(org.apache.camel.Exchange exchange)
    • pushRoute

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

      public org.apache.camel.Route popRoute()
      Specified by:
      popRoute in interface org.apache.camel.spi.UnitOfWork
      Overrides:
      popRoute in class DefaultUnitOfWork
    • beginTransactedBy

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

      public void endTransactedBy(Object key)
      Specified by:
      endTransactedBy in interface org.apache.camel.spi.UnitOfWork
      Overrides:
      endTransactedBy in class DefaultUnitOfWork
    • isBeforeAfterProcess

      public boolean isBeforeAfterProcess()
      Specified by:
      isBeforeAfterProcess in interface org.apache.camel.spi.UnitOfWork
      Overrides:
      isBeforeAfterProcess in class DefaultUnitOfWork
    • 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
      Overrides:
      beforeProcess in class DefaultUnitOfWork
    • 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
      Overrides:
      afterProcess in class DefaultUnitOfWork
    • clear

      public void clear()
      Clears information put on the MDC by this MDCUnitOfWork
    • done

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

      protected void onDone()
      Overrides:
      onDone in class DefaultUnitOfWork
    • reset

      public void reset()
      Specified by:
      reset in interface org.apache.camel.spi.UnitOfWork
      Overrides:
      reset in class DefaultUnitOfWork
    • start

      public void start()
      Specified by:
      start in interface org.apache.camel.Service
    • stop

      public void stop()
      Specified by:
      stop in interface org.apache.camel.Service
    • toString

      public String toString()
      Overrides:
      toString in class DefaultUnitOfWork