org.ow2.petals.component.framework.api.util
Interface ExchangeUtil


public interface ExchangeUtil

Contains utilities for the Exchange management.

Author:
Frederic Gardes, nsalatge - eBMWebsourcing

Method Summary
 Exchange copyExchange(javax.jbi.messaging.MessageExchangeFactory mef, Exchange source)
          create a new exchange copy of a source exchange
 void copyExchangeProperties(Exchange source, Exchange target)
          Copies the exchange's properties in another exchange.
 void copyNormalizedMessage(javax.jbi.messaging.NormalizedMessage source, javax.jbi.messaging.NormalizedMessage target)
          Copies a message's content, properties and attachments in another.
 boolean isBaseNotification(Exchange exchange)
          Check if the JBI exchange is a base notification exchange
 boolean isPetalsException(javax.jbi.messaging.Fault fault)
          Verify if the fault set is a real business fault, or an exception inserted into a fault (to respect the InOut MEP for example)
 

Method Detail

copyExchange

Exchange copyExchange(javax.jbi.messaging.MessageExchangeFactory mef,
                      Exchange source)
                      throws javax.jbi.messaging.MessagingException,
                             PEtALSCDKException
create a new exchange copy of a source exchange

Parameters:
mef - The factory to be able to create the new exchange
source - the source exchange
Returns:
the new exchange
Throws:
javax.jbi.messaging.MessagingException
PEtALSCDKException

copyNormalizedMessage

void copyNormalizedMessage(javax.jbi.messaging.NormalizedMessage source,
                           javax.jbi.messaging.NormalizedMessage target)
                           throws javax.jbi.messaging.MessagingException,
                                  PEtALSCDKException
Copies a message's content, properties and attachments in another.

Parameters:
source - the source normalized message
target - the target normalized message
Throws:
javax.jbi.messaging.MessagingException
PEtALSCDKException

copyExchangeProperties

void copyExchangeProperties(Exchange source,
                            Exchange target)
                            throws javax.jbi.messaging.MessagingException,
                                   PEtALSCDKException
Copies the exchange's properties in another exchange.

Parameters:
source - the source exchange
target - the target exchange
Throws:
javax.jbi.messaging.MessagingException
PEtALSCDKException

isPetalsException

boolean isPetalsException(javax.jbi.messaging.Fault fault)
                          throws PEtALSCDKException
Verify if the fault set is a real business fault, or an exception inserted into a fault (to respect the InOut MEP for example)

Parameters:
fault - : the fault to check
Returns:
true if the fault isn't functional, is a PEtALS exception. false else
Throws:
PEtALSCDKException

isBaseNotification

boolean isBaseNotification(Exchange exchange)
Check if the JBI exchange is a base notification exchange

Parameters:
exchange - the JBI exchange
Returns:
true if the exchange is a notification exchange, false else


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