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

java.lang.Object
  extended by org.ow2.petals.se.eip.patterns.AbstractPattern
All Implemented Interfaces:
Pattern
Direct Known Subclasses:
AbstractAggregatorPattern, AbstractMEPBridgePattern, Aggregator, WireTap

public abstract class AbstractPattern
extends java.lang.Object
implements Pattern

Created on 17 janv. 08

Since:
Author:
Christophe HAMERLING - eBM WebSourcing

Field Summary
protected  java.util.logging.Logger logger
           
 
Constructor Summary
AbstractPattern()
           
 
Method Summary
abstract  java.lang.String getNameSpace()
          Get the pattern namespace.
protected  boolean isAttachmentMode(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
          get the attachment mode into the extensions
protected  boolean isExceptionRobust(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
          get the exception robustness into the extensions
protected  boolean isFaultRobust(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
          get the fault robustness into the extensions
protected  boolean isFaultToException(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
          get the fault to exception parameter into the extensions
protected  void logSend(org.ow2.petals.component.framework.jbidescriptor.generated.Consumes consumedService, org.ow2.petals.component.framework.api.message.Exchange exchange)
          Allow to log an exchange sent to a
abstract  boolean process(org.ow2.petals.component.framework.api.message.Exchange exchange, ExchangeContext context)
          Process the message.
abstract  boolean processAsync(org.ow2.petals.component.framework.api.message.Exchange exchange, ExchangeContext context, CommonAsyncContext asyncContext)
          Process the async message.
 boolean processAsyncPattern(org.ow2.petals.component.framework.api.message.Exchange exchange, ExchangeContext context, CommonAsyncContext asyncContext, boolean expired)
          Process an exchange for an asynchronous pattern.
 boolean processExpiredAsync(org.ow2.petals.component.framework.api.message.Exchange exchange, ExchangeContext context, CommonAsyncContext asyncContext)
          Process the expired async message.
 boolean processPattern(org.ow2.petals.component.framework.api.message.Exchange exchange, ExchangeContext context)
          Process the Pattern.
abstract  boolean validateMEP(java.net.URI mep)
          Validate the MEP for the pattern.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.ow2.petals.se.eip.patterns.Pattern
getName, init
 

Field Detail

logger

protected java.util.logging.Logger logger
Constructor Detail

AbstractPattern

public AbstractPattern()
Method Detail

processPattern

public final boolean processPattern(org.ow2.petals.component.framework.api.message.Exchange exchange,
                                    ExchangeContext context)
Description copied from interface: Pattern
Process the Pattern.

Specified by:
processPattern in interface Pattern
Parameters:
exchange - The exchange to process
context - The context of the exchange

processAsyncPattern

public final boolean processAsyncPattern(org.ow2.petals.component.framework.api.message.Exchange exchange,
                                         ExchangeContext context,
                                         CommonAsyncContext asyncContext,
                                         boolean expired)
Description copied from interface: Pattern
Process an exchange for an asynchronous pattern.

Specified by:
processAsyncPattern in interface Pattern
Parameters:
exchange - The exchange to process
context - The context of the exchange
asyncContext - The EIP asynchronous context
expired - true if the asynchronous exchange is expired, false else

logSend

protected final void logSend(org.ow2.petals.component.framework.jbidescriptor.generated.Consumes consumedService,
                             org.ow2.petals.component.framework.api.message.Exchange exchange)
Allow to log an exchange sent to a

Parameters:
consumedService -
exchange -

process

public abstract boolean process(org.ow2.petals.component.framework.api.message.Exchange exchange,
                                ExchangeContext context)
Process the message.

Parameters:
exchange -
context -

processAsync

public abstract boolean processAsync(org.ow2.petals.component.framework.api.message.Exchange exchange,
                                     ExchangeContext context,
                                     CommonAsyncContext asyncContext)
Process the async message.

Parameters:
exchange -
context -

processExpiredAsync

public boolean processExpiredAsync(org.ow2.petals.component.framework.api.message.Exchange exchange,
                                   ExchangeContext context,
                                   CommonAsyncContext asyncContext)
                            throws javax.jbi.messaging.MessagingException,
                                   org.ow2.petals.component.framework.api.exception.PEtALSCDKException
Process the expired async message.

Parameters:
exchange -
context -
Throws:
javax.jbi.messaging.MessagingException
org.ow2.petals.component.framework.api.exception.PEtALSCDKException

validateMEP

public abstract boolean validateMEP(java.net.URI mep)
Validate the MEP for the pattern. This method is called on each message exchange in order to validate that the MEP is compatible.

Parameters:
mep - the mep of the incoming message.
Returns:
true if the mep is compatible, false otherwise.

isFaultRobust

protected boolean isFaultRobust(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
get the fault robustness into the extensions

Parameters:
extensions - the ConfigurationExtensions used
Returns:
true if the pattern have to be fault save, false else, and false if not found

isExceptionRobust

protected boolean isExceptionRobust(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
get the exception robustness into the extensions

Parameters:
extensions - the ConfigurationExtensions used
Returns:
true if the pattern have to be exception save, false else, and false if not found

isFaultToException

protected boolean isFaultToException(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
get the fault to exception parameter into the extensions

Parameters:
extensions - the ConfigurationExtensions used
Returns:
true if the pattern have to transform the faults to exceptions, false else, and false if not found

isAttachmentMode

protected boolean isAttachmentMode(org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions extensions)
get the attachment mode into the extensions

Parameters:
extensions - the ConfigurationExtensions used
Returns:
true if the pattern have to treat the attachments, false else, and false if not found

getNameSpace

public abstract java.lang.String getNameSpace()
Get the pattern namespace.

Returns:
The namespace


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