|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.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
|
static java.lang.String |
AGGREGATOR_ON_PROPERTIES
|
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 | |
|---|---|
static boolean |
aggregatorOnProperties(ConfigTree configTree)
|
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)
Deprecated. Use getAggregatorDetails(Message, int, boolean). |
static AggregationDetails |
getAggregatorDetails(Message message,
int tagIndex,
boolean aggregatorOnProperties)
|
static java.util.List<java.lang.String> |
getAggregatorTags(Message message)
Deprecated. Use getAggregatorTags(Message, boolean). |
static java.util.List<java.lang.String> |
getAggregatorTags(Message message,
boolean aggregatorOnProperties)
|
void |
initialise()
Initialise the action instance. |
protected static void |
mapCallDetails(java.util.Collection<Message> attachmentMessages,
Message aggregatedMessage,
java.lang.String uuId)
|
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)
Deprecated. Use setAggregatorTags(Message, List, boolean). |
static void |
setAggregatorTags(Message message,
java.util.List<java.lang.String> tags,
boolean aggregatorOnProperties)
|
| 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
public static final java.lang.String AGGREGATOR_ON_PROPERTIES
protected ConfigTree config
| Constructor Detail |
|---|
public Aggregator(ConfigTree config)
throws ConfigurationException,
RegistryException
ConfigurationException
RegistryException| Method Detail |
|---|
public void initialise()
throws ActionLifecycleException
initialise in interface ActionLifecycleinitialise in class AbstractActionLifecycleActionLifecycleException - 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 ActionLifecycledestroy in class AbstractActionLifecycleActionLifecycleException
public Message process(Message message)
throws ActionProcessingException
message -
ActionProcessingExceptionpublic static java.util.List<java.lang.String> getAggregatorTags(Message message)
getAggregatorTags(Message, boolean).
public static java.util.List<java.lang.String> getAggregatorTags(Message message,
boolean aggregatorOnProperties)
public static void setAggregatorTags(Message message,
java.util.List<java.lang.String> tags)
setAggregatorTags(Message, List, boolean).
public static void setAggregatorTags(Message message,
java.util.List<java.lang.String> tags,
boolean aggregatorOnProperties)
public static AggregationDetails getAggregatorDetails(Message message,
int tagIndex)
throws ActionProcessingException
getAggregatorDetails(Message, int, boolean).
ActionProcessingException
public static AggregationDetails getAggregatorDetails(Message message,
int tagIndex,
boolean aggregatorOnProperties)
throws ActionProcessingException
ActionProcessingExceptionpublic static boolean aggregatorOnProperties(ConfigTree configTree)
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
protected static void mapCallDetails(java.util.Collection<Message> attachmentMessages,
Message aggregatedMessage,
java.lang.String uuId)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||