|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.camel.support.ServiceSupport org.apache.camel.processor.aggregate.MemoryAggregationRepository
public class MemoryAggregationRepository
A memory based AggregationRepository
which stores in memory only.
Field Summary |
---|
Fields inherited from class org.apache.camel.support.ServiceSupport |
---|
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending |
Constructor Summary | |
---|---|
MemoryAggregationRepository()
|
Method Summary | |
---|---|
Exchange |
add(CamelContext camelContext,
String key,
Exchange exchange)
Add the given Exchange under the correlation key. |
void |
confirm(CamelContext camelContext,
String exchangeId)
Confirms the completion of the Exchange . |
protected void |
doStart()
Implementations override this method to support customized start/stop. |
protected void |
doStop()
Implementations override this method to support customized start/stop. |
Exchange |
get(CamelContext camelContext,
String key)
Gets the given exchange with the correlation key |
Set<String> |
getKeys()
Gets the keys currently in the repository. |
void |
remove(CamelContext camelContext,
String key,
Exchange exchange)
Removes the exchange with the given correlation key, which should happen when an Exchange is completed |
Methods inherited from class org.apache.camel.support.ServiceSupport |
---|
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspended, isSuspending, resume, shutdown, start, stop, suspend |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MemoryAggregationRepository()
Method Detail |
---|
public Exchange add(CamelContext camelContext, String key, Exchange exchange)
AggregationRepository
Exchange
under the correlation key.
Will replace any existing exchange.
add
in interface AggregationRepository
camelContext
- the current CamelContextkey
- the correlation keyexchange
- the aggregated exchange
public Exchange get(CamelContext camelContext, String key)
AggregationRepository
get
in interface AggregationRepository
camelContext
- the current CamelContextkey
- the correlation key
public void remove(CamelContext camelContext, String key, Exchange exchange)
AggregationRepository
Exchange
is completed
remove
in interface AggregationRepository
camelContext
- the current CamelContextkey
- the correlation keyexchange
- the exchange to removepublic void confirm(CamelContext camelContext, String exchangeId)
AggregationRepository
Exchange
.
confirm
in interface AggregationRepository
camelContext
- the current CamelContextexchangeId
- exchange id to confirmpublic Set<String> getKeys()
AggregationRepository
getKeys
in interface AggregationRepository
protected void doStart() throws Exception
ServiceSupport
ServiceSupport.doStop()
for more details.
doStart
in class ServiceSupport
Exception
ServiceSupport.doStop()
protected void doStop() throws Exception
ServiceSupport
ServiceSupport.doStop()
method when
the service is being stopped. This method will also be invoked
if the service is still in uninitialized state (eg has not
been started). The method is always called to allow the service
to do custom logic when the service is being stopped, such as when
CamelContext
is shutting down.
doStop
in class ServiceSupport
Exception
ServiceSupport.doStart()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |