Class ShareUnitOfWorkAggregationStrategy

  • All Implemented Interfaces:
    AutoCloseable, org.apache.camel.AggregationStrategy, org.apache.camel.CamelContextAware, org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.StatefulService, org.apache.camel.SuspendableService

    public final class ShareUnitOfWorkAggregationStrategy
    extends org.apache.camel.support.service.ServiceSupport
    implements org.apache.camel.AggregationStrategy, org.apache.camel.CamelContextAware
    An AggregationStrategy which are used when the option shareUnitOfWork is enabled on EIPs such as multicast, splitter or recipientList.

    This strategy wraps the actual in use strategy to provide the logic needed for making shareUnitOfWork work.

    This strategy is not intended for end users to use.

    • Field Summary

      • Fields inherited from class org.apache.camel.support.service.BaseService

        BUILT, FAILED, INITIALIZED, INITIALIZING, lock, NEW, SHUTDOWN, SHUTTING_DOWN, STARTED, STARTING, status, STOPPED, STOPPING, SUSPENDED, SUSPENDING
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.apache.camel.Exchange aggregate​(org.apache.camel.Exchange oldExchange, org.apache.camel.Exchange newExchange)  
      org.apache.camel.Exchange aggregate​(org.apache.camel.Exchange oldExchange, org.apache.camel.Exchange newExchange, org.apache.camel.Exchange inputExchange)  
      boolean canPreComplete()  
      protected void doBuild()  
      protected void doInit()  
      protected void doStart()  
      protected void doStop()  
      org.apache.camel.CamelContext getCamelContext()  
      org.apache.camel.AggregationStrategy getDelegate()  
      void onCompletion​(org.apache.camel.Exchange exchange)  
      void onCompletion​(org.apache.camel.Exchange exchange, org.apache.camel.Exchange inputExchange)  
      void onOptimisticLockFailure​(org.apache.camel.Exchange oldExchange, org.apache.camel.Exchange newExchange)  
      boolean preComplete​(org.apache.camel.Exchange oldExchange, org.apache.camel.Exchange newExchange)  
      protected void propagateFailure​(org.apache.camel.Exchange answer, org.apache.camel.Exchange newExchange)  
      void setCamelContext​(org.apache.camel.CamelContext camelContext)  
      void timeout​(org.apache.camel.Exchange exchange, int index, int total, long timeout)  
      String toString()  
      • Methods inherited from class org.apache.camel.support.service.BaseService

        build, doFail, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
      • Methods inherited from interface org.apache.camel.Service

        build, close, init, start, stop
      • Methods inherited from interface org.apache.camel.ShutdownableService

        shutdown
      • Methods inherited from interface org.apache.camel.StatefulService

        getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspending
      • Methods inherited from interface org.apache.camel.SuspendableService

        isSuspended, resume, suspend
    • Constructor Detail

      • ShareUnitOfWorkAggregationStrategy

        public ShareUnitOfWorkAggregationStrategy​(org.apache.camel.AggregationStrategy strategy)
    • Method Detail

      • setCamelContext

        public void setCamelContext​(org.apache.camel.CamelContext camelContext)
        Specified by:
        setCamelContext in interface org.apache.camel.CamelContextAware
      • getCamelContext

        public org.apache.camel.CamelContext getCamelContext()
        Specified by:
        getCamelContext in interface org.apache.camel.CamelContextAware
      • getDelegate

        public org.apache.camel.AggregationStrategy getDelegate()
      • canPreComplete

        public boolean canPreComplete()
        Specified by:
        canPreComplete in interface org.apache.camel.AggregationStrategy
      • preComplete

        public boolean preComplete​(org.apache.camel.Exchange oldExchange,
                                   org.apache.camel.Exchange newExchange)
        Specified by:
        preComplete in interface org.apache.camel.AggregationStrategy
      • onCompletion

        public void onCompletion​(org.apache.camel.Exchange exchange)
        Specified by:
        onCompletion in interface org.apache.camel.AggregationStrategy
      • onCompletion

        public void onCompletion​(org.apache.camel.Exchange exchange,
                                 org.apache.camel.Exchange inputExchange)
        Specified by:
        onCompletion in interface org.apache.camel.AggregationStrategy
      • timeout

        public void timeout​(org.apache.camel.Exchange exchange,
                            int index,
                            int total,
                            long timeout)
        Specified by:
        timeout in interface org.apache.camel.AggregationStrategy
      • onOptimisticLockFailure

        public void onOptimisticLockFailure​(org.apache.camel.Exchange oldExchange,
                                            org.apache.camel.Exchange newExchange)
        Specified by:
        onOptimisticLockFailure in interface org.apache.camel.AggregationStrategy
      • aggregate

        public org.apache.camel.Exchange aggregate​(org.apache.camel.Exchange oldExchange,
                                                   org.apache.camel.Exchange newExchange)
        Specified by:
        aggregate in interface org.apache.camel.AggregationStrategy
      • aggregate

        public org.apache.camel.Exchange aggregate​(org.apache.camel.Exchange oldExchange,
                                                   org.apache.camel.Exchange newExchange,
                                                   org.apache.camel.Exchange inputExchange)
        Specified by:
        aggregate in interface org.apache.camel.AggregationStrategy
      • propagateFailure

        protected void propagateFailure​(org.apache.camel.Exchange answer,
                                        org.apache.camel.Exchange newExchange)
      • doBuild

        protected void doBuild()
                        throws Exception
        Overrides:
        doBuild in class org.apache.camel.support.service.BaseService
        Throws:
        Exception
      • doInit

        protected void doInit()
                       throws Exception
        Overrides:
        doInit in class org.apache.camel.support.service.BaseService
        Throws:
        Exception
      • doStart

        protected void doStart()
                        throws Exception
        Overrides:
        doStart in class org.apache.camel.support.service.BaseService
        Throws:
        Exception
      • doStop

        protected void doStop()
                       throws Exception
        Overrides:
        doStop in class org.apache.camel.support.service.BaseService
        Throws:
        Exception