|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.soa.esb.actions.AbstractActionLifecycle org.jboss.soa.esb.actions.AbstractActionPipelineProcessor org.jboss.soa.esb.actions.Aggregator
public class Aggregator
Simple Aggregator. The aggregator relies on 'aggregatorTags'. To puzzle the individual back together. The aggregatorTag is set in the MessageRouter.deliverAsync() 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.
Field Summary | |
---|---|
static java.lang.String |
AGGEGRATOR_TAG
|
protected ConfigTree |
config
|
static java.lang.String |
SPLITTER_TIME_STAMP
|
Fields inherited from interface org.jboss.soa.esb.actions.ActionPipelineProcessor |
---|
PROCESS_EXCEPTION_METHOD, PROCESS_METHOD, PROCESS_SUCCESS_METHOD |
Constructor Summary | |
---|---|
Aggregator(ConfigTree config)
|
Method Summary | |
---|---|
Message |
createAggregateMessage(Message message)
Aggregates a single message into an aggregated message. |
Message |
createAggregateMessage(java.lang.String uuId,
java.util.Map<java.lang.Integer,Message> messageMap)
Aggregates the messages into 1 new message with an attachment for each message. |
static void |
decorate(Message message)
|
void |
destroy()
Destroy the action instance. |
java.util.Map<java.lang.String,java.util.Map<java.lang.Integer,Message>> |
getAggregatedMessageMap()
|
static AggregationDetails |
getAggregatorDetails(Message message,
int tagIndex)
|
static java.util.List<java.lang.String> |
getAggregatorTags(Message message)
|
void |
initialise()
Initialise the action instance. |
Message |
process(Message message)
Processes an incoming message, aggregates messages in a set and returns a aggregated message when isComplete() is satisfied. |
static void |
setAggregatorTags(Message message,
java.util.List<java.lang.String> tags)
|
Methods inherited from class org.jboss.soa.esb.actions.AbstractActionPipelineProcessor |
---|
processException, processSuccess |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String AGGEGRATOR_TAG
public static final java.lang.String SPLITTER_TIME_STAMP
protected ConfigTree config
Constructor Detail |
---|
public Aggregator(ConfigTree config) throws ConfigurationException, RegistryException
ConfigurationException
RegistryException
Method Detail |
---|
public void initialise() throws ActionLifecycleException
initialise
in interface ActionLifecycle
initialise
in class AbstractActionLifecycle
ActionLifecycleException
- for errors during initialisation.public java.util.Map<java.lang.String,java.util.Map<java.lang.Integer,Message>> getAggregatedMessageMap()
public void destroy() throws ActionLifecycleException
destroy
in interface ActionLifecycle
destroy
in class AbstractActionLifecycle
ActionLifecycleException
public Message process(Message message) throws ActionProcessingException
message
-
ActionProcessingException
public static java.util.List<java.lang.String> getAggregatorTags(Message message)
public static void setAggregatorTags(Message message, java.util.List<java.lang.String> tags)
public static AggregationDetails getAggregatorDetails(Message message, int tagIndex) throws ActionProcessingException
ActionProcessingException
public static void decorate(Message message)
public Message createAggregateMessage(Message message) throws ActionProcessingException
message
-
ActionProcessingException
public Message createAggregateMessage(java.lang.String uuId, java.util.Map<java.lang.Integer,Message> messageMap) throws ActionProcessingException
uuId
- messageMap
-
ActionProcessingException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |