org.apache.camel.spi
Interface AggregationRepository

All Known Subinterfaces:
RecoverableAggregationRepository
All Known Implementing Classes:
MemoryAggregationRepository

public interface AggregationRepository

Access to a repository to store aggregated exchanges to support pluggable implementations.

Version:

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.
 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
 

Method Detail

add

Exchange add(CamelContext camelContext,
             String key,
             Exchange exchange)
Add the given Exchange under the correlation key.

Will replace any existing exchange.

Parameters:
camelContext - the current CamelContext
key - the correlation key
exchange - the aggregated exchange
Returns:
the old exchange if any existed

get

Exchange get(CamelContext camelContext,
             String key)
Gets the given exchange with the correlation key

Parameters:
camelContext - the current CamelContext
key - the correlation key
Returns:
the exchange, or null if no exchange was previously added

remove

void remove(CamelContext camelContext,
            String key,
            Exchange exchange)
Removes the exchange with the given correlation key, which should happen when an Exchange is completed

Parameters:
camelContext - the current CamelContext
key - the correlation key
exchange - the exchange to remove

confirm

void confirm(CamelContext camelContext,
             String exchangeId)
Confirms the completion of the Exchange.

Parameters:
camelContext - the current CamelContext
exchangeId - exchange id to confirm

getKeys

Set<String> getKeys()
Gets the keys currently in the repository.

Returns:
the keys


Apache CAMEL