Package org.apache.camel.impl.engine
Class PrototypeExchangeFactory
- java.lang.Object
-
- org.apache.camel.support.service.BaseService
-
- org.apache.camel.support.service.ServiceSupport
-
- org.apache.camel.support.PooledObjectFactorySupport<org.apache.camel.Exchange>
-
- org.apache.camel.impl.engine.PrototypeExchangeFactory
-
- 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
- Direct Known Subclasses:
PooledExchangeFactory
public class PrototypeExchangeFactory extends org.apache.camel.support.PooledObjectFactorySupport<org.apache.camel.Exchange> implements org.apache.camel.spi.ExchangeFactory
ExchangeFactory
that creates a newExchange
instance.
-
-
Field Summary
-
Fields inherited from class org.apache.camel.support.PooledObjectFactorySupport
camelContext, capacity, pool, source, statistics, statisticsEnabled
-
-
Constructor Summary
Constructors Constructor Description PrototypeExchangeFactory()
PrototypeExchangeFactory(org.apache.camel.Consumer consumer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.camel.Exchange
acquire()
org.apache.camel.Exchange
create(boolean autoRelease)
org.apache.camel.Exchange
create(org.apache.camel.Endpoint fromEndpoint, boolean autoRelease)
protected void
doBuild()
protected void
doStart()
protected void
doStop()
org.apache.camel.Consumer
getConsumer()
String
getRouteId()
boolean
isPooled()
org.apache.camel.spi.ExchangeFactory
newExchangeFactory(org.apache.camel.Consumer consumer)
boolean
release(org.apache.camel.Exchange exchange)
void
setRouteId(String routeId)
-
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 class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
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
-
-
-
-
Method Detail
-
doBuild
protected void doBuild() throws Exception
- Overrides:
doBuild
in classorg.apache.camel.support.PooledObjectFactorySupport<org.apache.camel.Exchange>
- Throws:
Exception
-
getRouteId
public String getRouteId()
- Specified by:
getRouteId
in interfaceorg.apache.camel.spi.RouteIdAware
-
setRouteId
public void setRouteId(String routeId)
- Specified by:
setRouteId
in interfaceorg.apache.camel.spi.RouteIdAware
-
getConsumer
public org.apache.camel.Consumer getConsumer()
- Specified by:
getConsumer
in interfaceorg.apache.camel.spi.ExchangeFactory
-
newExchangeFactory
public org.apache.camel.spi.ExchangeFactory newExchangeFactory(org.apache.camel.Consumer consumer)
- Specified by:
newExchangeFactory
in interfaceorg.apache.camel.spi.ExchangeFactory
-
acquire
public org.apache.camel.Exchange acquire()
- Specified by:
acquire
in interfaceorg.apache.camel.spi.PooledObjectFactory<org.apache.camel.Exchange>
-
create
public org.apache.camel.Exchange create(boolean autoRelease)
- Specified by:
create
in interfaceorg.apache.camel.spi.ExchangeFactory
-
create
public org.apache.camel.Exchange create(org.apache.camel.Endpoint fromEndpoint, boolean autoRelease)
- Specified by:
create
in interfaceorg.apache.camel.spi.ExchangeFactory
-
release
public boolean release(org.apache.camel.Exchange exchange)
- Specified by:
release
in interfaceorg.apache.camel.spi.ExchangeFactory
- Specified by:
release
in interfaceorg.apache.camel.spi.PooledObjectFactory<org.apache.camel.Exchange>
-
isPooled
public boolean isPooled()
- Specified by:
isPooled
in interfaceorg.apache.camel.spi.PooledObjectFactory<org.apache.camel.Exchange>
- Overrides:
isPooled
in classorg.apache.camel.support.PooledObjectFactorySupport<org.apache.camel.Exchange>
-
doStart
protected void doStart() throws Exception
- Overrides:
doStart
in classorg.apache.camel.support.service.BaseService
- Throws:
Exception
-
-