public interface AggregationRepository
Modifier and Type | Method and Description |
---|---|
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
This method is always invoked for any incoming exchange in the aggregator.
|
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
Important: This method is not invoked if only one exchange was completed, and therefore the
exchange does not need to be added to a repository, as its completed immediately. |
Exchange add(CamelContext camelContext, String key, Exchange exchange)
Exchange
under the correlation key.
Will replace any existing exchange.
Important: This method is not invoked if only one exchange was completed, and therefore the
exchange does not need to be added to a repository, as its completed immediately.camelContext
- the current CamelContextkey
- the correlation keyexchange
- the aggregated exchangeExchange get(CamelContext camelContext, String key)
camelContext
- the current CamelContextkey
- the correlation keyvoid remove(CamelContext camelContext, String key, Exchange exchange)
Exchange
is completed
Important: This method is not invoked if only one exchange was completed, and therefore the
exchange does not need to be added to a repository, as its completed immediately.camelContext
- the current CamelContextkey
- the correlation keyexchange
- the exchange to removevoid confirm(CamelContext camelContext, String exchangeId)
Exchange
.
This method is always invoked.camelContext
- the current CamelContextexchangeId
- exchange id to confirmApache Camel