org.mule.interceptors
Class MessageNormalizerInterceptor

java.lang.Object
  extended byorg.mule.interceptors.MessageNormalizerInterceptor
All Implemented Interfaces:
UMOInterceptor
Direct Known Subclasses:
JXPathNormalizerInterceptor

public abstract class MessageNormalizerInterceptor
extends java.lang.Object
implements UMOInterceptor

MessageNormalizerInterceptor can be used as a simple pre/post message normalizer for a given component. This is useful in situations where you have an existing component that may accept a one or more child objects of the incoming object. For example, you may Have a BankQuoteRequest object that contains customer, credit and loan details, but one component is only interested in enriching the customer information. Rather than have your component understand how to deal with a BankLoanRequest this interceptor can be used to extract the customer and pass that to the component. Once the component have finshed processing this interceptor update the BankLoanRequest with the new customer information.

Version:
$Revision: 1.1.1.1 $
Author:
Ross Mason

Constructor Summary
MessageNormalizerInterceptor()
           
 
Method Summary
abstract  UMOMessage after(Invocation invocation)
          This method is invoked after the event has been processed
abstract  UMOMessage before(Invocation invocation)
          This method is invoked before the event is processed
protected  java.lang.Object getOriginalPayload()
           
 UMOMessage intercept(Invocation invocation)
          Invoked by the previous interceptor in the chain
protected  void setOriginalPayload(java.lang.Object originalPayload)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageNormalizerInterceptor

public MessageNormalizerInterceptor()
Method Detail

before

public abstract UMOMessage before(Invocation invocation)
                           throws UMOException
This method is invoked before the event is processed

Parameters:
invocation - the message invocation being processed
Throws:
UMOException

after

public abstract UMOMessage after(Invocation invocation)
                          throws UMOException
This method is invoked after the event has been processed

Parameters:
invocation - the message invocation being processed
Throws:
UMOException

intercept

public final UMOMessage intercept(Invocation invocation)
                           throws UMOException
Description copied from interface: UMOInterceptor
Invoked by the previous interceptor in the chain

Specified by:
intercept in interface UMOInterceptor
Parameters:
invocation - the invocation containing info about the current message and component
Returns:
A result message that may have been altered by this invocation
Throws:
UMOException - if the invocation fails

getOriginalPayload

protected java.lang.Object getOriginalPayload()

setOriginalPayload

protected void setOriginalPayload(java.lang.Object originalPayload)


Copyright © 2003-2005 SymphonySoft Limited. All Rights Reserved.