org.ow2.petals.se.eip.patterns
Class Aggregator

java.lang.Object
  extended by org.ow2.petals.se.eip.patterns.AbstractPattern
      extended by org.ow2.petals.se.eip.patterns.Aggregator
All Implemented Interfaces:
Pattern

public class Aggregator
extends AbstractPattern

Receives a bunch of messages and identifies messages that are correlated (XPATH expression). Once a complete set of messages has been received (XPATH expression on special message to decide that the set is complete), the aggregator collects information from each correlated message and publishes a single, aggregated message to the output channel for further processing. It returns the result to this special message if it exists.

Since:
2.0
Author:
alouis - EBM WebSourcing, chamerling - EBM WebSourcing, fgardes - EBM WebSourcing

Field Summary
static java.lang.String AGGREGATOR_NAMESPACE
           
 
Fields inherited from class org.ow2.petals.se.eip.patterns.AbstractPattern
logger
 
Constructor Summary
Aggregator()
           
 
Method Summary
 java.lang.String getName()
          Get the pattern name.
 java.lang.String getNameSpace()
          Get the pattern namespace.
 void init()
          Initialize the pattern
 boolean process(org.ow2.petals.component.framework.api.message.Exchange exchange, ExchangeContext context)
          Process the message.
 boolean processAsync(org.ow2.petals.component.framework.api.message.Exchange exchange, ExchangeContext context, CommonAsyncContext asyncContext)
          Process the async message.
 boolean validateMEP(java.net.URI pattern)
          Validate the MEP for the pattern.
 
Methods inherited from class org.ow2.petals.se.eip.patterns.AbstractPattern
isAttachmentMode, isExceptionRobust, isFaultRobust, isFaultToException, logSend, processAsyncPattern, processExpiredAsync, processPattern
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AGGREGATOR_NAMESPACE

public static final java.lang.String AGGREGATOR_NAMESPACE
See Also:
Constant Field Values
Constructor Detail

Aggregator

public Aggregator()
Method Detail

getName

public java.lang.String getName()
Description copied from interface: Pattern
Get the pattern name.

Returns:
The name

getNameSpace

public java.lang.String getNameSpace()
Description copied from class: AbstractPattern
Get the pattern namespace.

Specified by:
getNameSpace in class AbstractPattern
Returns:
The namespace

init

public void init()
Description copied from interface: Pattern
Initialize the pattern


process

public boolean process(org.ow2.petals.component.framework.api.message.Exchange exchange,
                       ExchangeContext context)
Description copied from class: AbstractPattern
Process the message.

Specified by:
process in class AbstractPattern

processAsync

public boolean processAsync(org.ow2.petals.component.framework.api.message.Exchange exchange,
                            ExchangeContext context,
                            CommonAsyncContext asyncContext)
Description copied from class: AbstractPattern
Process the async message.

Specified by:
processAsync in class AbstractPattern

validateMEP

public boolean validateMEP(java.net.URI pattern)
Description copied from class: AbstractPattern
Validate the MEP for the pattern. This method is called on each message exchange in order to validate that the MEP is compatible.

Specified by:
validateMEP in class AbstractPattern
Parameters:
pattern - the mep of the incoming message.
Returns:
true if the mep is compatible, false otherwise.


Copyright © 2005-2011 Petals Link (EBM Websourcing). All Rights Reserved.