Class UnitOfWorkForMDC

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

public class UnitOfWorkForMDC extends org.apache.camel.impl.engine.MDCUnitOfWork implements org.apache.camel.spi.UnitOfWork
Unit of Work class for custom MDC values.
Author:
Infosys Equinox
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The Constant MDC_BUSINESS_ID.
    static final String
    The Constant MDC_SK_SESSION_ID.
    static final String
    The Constant MDC_STORE_ID.
    static final String
    The Constant MDC_USER_ID.

    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
    Constructor
    Description
    UnitOfWorkForMDC(org.apache.camel.Exchange exchange)
    Constructor for UnitOfWorkForMDC.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    afterRoute(org.apache.camel.Exchange exchange, org.apache.camel.Route route)
    method for persisting custom MDC values from the route.
    org.apache.camel.spi.UnitOfWork
    newInstance(org.apache.camel.Exchange exchange)
    returns the custom unit of work for custom MDC values.

    Methods inherited from class org.apache.camel.impl.engine.MDCUnitOfWork

    afterProcess, beforeProcess, beginTransactedBy, clear, clearCustom, done, endTransactedBy, isBeforeAfterProcess, onDone, popRoute, prepareMDC, pushRoute, reset, start, stop, toString

    Methods inherited from class org.apache.camel.impl.engine.DefaultUnitOfWork

    addSynchronization, beforeRoute, containsSynchronization, createChildUnitOfWork, getOriginalInMessage, getRoute, handoverSynchronization, handoverSynchronization, isTransacted, isTransactedBy, onPrepare, removeSynchronization, routeStackLevel, routeStackLevel, setParentUnitOfWork

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.apache.camel.Service

    build, close, init

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

    addSynchronization, afterProcess, beforeProcess, beforeRoute, beginTransactedBy, containsSynchronization, createChildUnitOfWork, done, endTransactedBy, getOriginalInMessage, getRoute, handoverSynchronization, handoverSynchronization, isBeforeAfterProcess, isTransacted, isTransactedBy, onPrepare, popRoute, pushRoute, removeSynchronization, reset, routeStackLevel, routeStackLevel, setParentUnitOfWork
  • Field Details

  • Constructor Details

    • UnitOfWorkForMDC

      public UnitOfWorkForMDC(org.apache.camel.Exchange exchange)
      Constructor for UnitOfWorkForMDC.
      Parameters:
      exchange - a Exchange object.
  • Method Details

    • afterRoute

      public void afterRoute(org.apache.camel.Exchange exchange, org.apache.camel.Route route)
      method for persisting custom MDC values from the route.
      Specified by:
      afterRoute in interface org.apache.camel.spi.UnitOfWork
      Overrides:
      afterRoute in class org.apache.camel.impl.engine.DefaultUnitOfWork
    • newInstance

      public org.apache.camel.spi.UnitOfWork newInstance(org.apache.camel.Exchange exchange)
      returns the custom unit of work for custom MDC values.
      Overrides:
      newInstance in class org.apache.camel.impl.engine.MDCUnitOfWork