Class MDCUnitOfWork

  • All Implemented Interfaces:
    AutoCloseable, org.apache.camel.Service, org.apache.camel.spi.UnitOfWork

    public class MDCUnitOfWork
    extends DefaultUnitOfWork
    This unit of work supports MDC.
    • Constructor Detail

      • MDCUnitOfWork

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

      • newInstance

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

        public void stop()
        Specified by:
        stop in interface org.apache.camel.Service
        Overrides:
        stop in class DefaultUnitOfWork
      • 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