Class PooledExchangeFactory

  • All Implemented Interfaces:
    AutoCloseable, org.apache.camel.CamelContextAware, org.apache.camel.NonManagedService, org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.spi.ExchangeFactory, org.apache.camel.spi.PooledObjectFactory<org.apache.camel.Exchange>, org.apache.camel.spi.RouteIdAware, org.apache.camel.StatefulService, org.apache.camel.SuspendableService

    public final class PooledExchangeFactory
    extends PrototypeExchangeFactory
    Pooled ExchangeFactory that reuses Exchange instance from a pool.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.apache.camel.support.PooledObjectFactorySupport

        org.apache.camel.support.PooledObjectFactorySupport.UtilizationStatistics
      • Nested classes/interfaces inherited from interface org.apache.camel.spi.PooledObjectFactory

        org.apache.camel.spi.PooledObjectFactory.Statistics
    • Field Summary

      • Fields inherited from class org.apache.camel.support.PooledObjectFactorySupport

        camelContext, capacity, pool, source, statistics, statisticsEnabled
      • 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
      • Fields inherited from interface org.apache.camel.spi.ExchangeFactory

        FACTORY
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.apache.camel.Exchange create​(boolean autoRelease)  
      org.apache.camel.Exchange create​(org.apache.camel.Endpoint fromEndpoint, boolean autoRelease)  
      protected org.apache.camel.PooledExchange createPooledExchange​(org.apache.camel.Endpoint fromEndpoint, boolean autoRelease)  
      protected void doBuild()  
      protected void doStop()  
      boolean isPooled()  
      org.apache.camel.spi.ExchangeFactory newExchangeFactory​(org.apache.camel.Consumer consumer)  
      boolean release​(org.apache.camel.Exchange exchange)  
      • Methods inherited from class org.apache.camel.support.PooledObjectFactorySupport

        doShutdown, getCamelContext, getCapacity, getSize, getStatistics, isStatisticsEnabled, purge, resetStatistics, setCamelContext, setCapacity, setStatisticsEnabled
      • Methods inherited from class org.apache.camel.support.service.BaseService

        build, doFail, doInit, doLifecycleChange, doResume, 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.CamelContextAware

        getCamelContext, setCamelContext
      • Methods inherited from interface org.apache.camel.spi.PooledObjectFactory

        getCapacity, getSize, getStatistics, isStatisticsEnabled, purge, resetStatistics, setCapacity, setStatisticsEnabled
      • 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

      • PooledExchangeFactory

        public PooledExchangeFactory()
      • PooledExchangeFactory

        public PooledExchangeFactory​(org.apache.camel.Consumer consumer)
    • Method Detail

      • newExchangeFactory

        public org.apache.camel.spi.ExchangeFactory newExchangeFactory​(org.apache.camel.Consumer consumer)
        Specified by:
        newExchangeFactory in interface org.apache.camel.spi.ExchangeFactory
        Overrides:
        newExchangeFactory in class PrototypeExchangeFactory
      • create

        public org.apache.camel.Exchange create​(boolean autoRelease)
        Specified by:
        create in interface org.apache.camel.spi.ExchangeFactory
        Overrides:
        create in class PrototypeExchangeFactory
      • create

        public org.apache.camel.Exchange create​(org.apache.camel.Endpoint fromEndpoint,
                                                boolean autoRelease)
        Specified by:
        create in interface org.apache.camel.spi.ExchangeFactory
        Overrides:
        create in class PrototypeExchangeFactory
      • release

        public boolean release​(org.apache.camel.Exchange exchange)
        Specified by:
        release in interface org.apache.camel.spi.ExchangeFactory
        Specified by:
        release in interface org.apache.camel.spi.PooledObjectFactory<org.apache.camel.Exchange>
        Overrides:
        release in class PrototypeExchangeFactory
      • createPooledExchange

        protected org.apache.camel.PooledExchange createPooledExchange​(org.apache.camel.Endpoint fromEndpoint,
                                                                       boolean autoRelease)
      • isPooled

        public boolean isPooled()
        Specified by:
        isPooled in interface org.apache.camel.spi.PooledObjectFactory<org.apache.camel.Exchange>
        Overrides:
        isPooled in class PrototypeExchangeFactory