org.jboss.soa.esb.actions
Class Aggregator
java.lang.Object
org.jboss.soa.esb.actions.Aggregator
public class Aggregator
- extends java.lang.Object
Simple Aggregator. The aggregator relies on 'aggregatorTags'. To puzzle the individual
back together. The aggregatorTag is set in the MessageRouter.deliver() method. The aggregator
adds a collected message in the series as attachements to a new message. When all
messages are received or if we are timeout an aggregated message is returned.
In all other cases null is returned.
Future enhancement should be
- all sort of waitfor/timout algorithms.
- persisting the map so no messages get lost.
- make the map managable.
- Author:
- kurt.stam@redhat.com
|
Method Summary |
Message |
process(Message message)
Processes an incoming message, aggregates messages in a set and returns a aggregated message
when isComplete() is satisfied. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_aggregatedMessageMap
public static java.util.concurrent.ConcurrentHashMap<java.lang.String,java.util.concurrent.ConcurrentHashMap<java.lang.String,Message>> _aggregatedMessageMap
config
protected ConfigTree config
Aggregator
public Aggregator(ConfigTree config)
throws ConfigurationException,
RegistryException
- Throws:
ConfigurationException
RegistryException
process
public Message process(Message message)
throws MessageRouterException
- Processes an incoming message, aggregates messages in a set and returns a aggregated message
when isComplete() is satisfied. The aggregated messages are set as attachments to this message.
Next the message can be send to a transformer to do the second part of the aggregation which is
to convert the attachement messages into to one message.
- Parameters:
message -
- Returns:
- a aggregated message, or null if the aggregation has not been completed.
- Throws:
MessageRouterException