Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
CorrelationAggregator |
|
| 1.0;1 | ||||
CorrelationAggregator$1 |
|
| 1.0;1 | ||||
CorrelationAggregator$DelegateCorrelatorCallback |
|
| 1.0;1 |
1 | /* | |
2 | * $Id: CorrelationAggregator.java 11567 2008-04-11 13:08:05Z dirk.olmes $ | |
3 | * -------------------------------------------------------------------------------------- | |
4 | * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com | |
5 | * | |
6 | * The software in this package is published under the terms of the CPAL v1.0 | |
7 | * license, a copy of which has been included with this distribution in the | |
8 | * LICENSE.txt file. | |
9 | */ | |
10 | ||
11 | package org.mule.routing.inbound; | |
12 | ||
13 | import org.mule.api.MuleMessage; | |
14 | import org.mule.routing.AggregationException; | |
15 | import org.mule.routing.CollectionCorrelatorCallback; | |
16 | import org.mule.routing.EventCorrelatorCallback; | |
17 | ||
18 | /** | |
19 | * <code>CorrelationAggregator</code> uses the CorrelationID and | |
20 | * CorrelationGroupSize properties of the {@link org.mule.api.MuleMessage} to manage | |
21 | * message groups. | |
22 | */ | |
23 | 0 | public abstract class CorrelationAggregator extends AbstractEventAggregator |
24 | { | |
25 | ||
26 | protected EventCorrelatorCallback getCorrelatorCallback() | |
27 | { | |
28 | 0 | return new DelegateCorrelatorCallback(); |
29 | } | |
30 | ||
31 | protected abstract MuleMessage aggregateEvents(EventGroup events) throws AggregationException; | |
32 | ||
33 | 0 | private class DelegateCorrelatorCallback extends CollectionCorrelatorCallback |
34 | { | |
35 | public MuleMessage aggregateEvents(EventGroup events) throws AggregationException | |
36 | { | |
37 | 0 | return CorrelationAggregator.this.aggregateEvents(events); |
38 | } | |
39 | } | |
40 | ||
41 | } |