com.sap.aii.af.lib.mp.module

Interface Module


public interface Module

A XI AF module implements a usually stateless message processing step such as static conversions, user exits, specific enrichments of message data, etc. It must be implemented as local or remote session ejb that is access by the XI AF MP via the standard ejb lookup. It may be implemented as simple Java class as well but package references must be maintained manually. Important: The XI AF MP itself (which is in turn an ejb) implements the ModuleProcessor interface. If an adapter calls the XI AF MP it has to use the ejb remote or local ModuleProcessor interface to feed a message into the ModuleProcessorBean.


Field Summary
static char MODULE_TYPE_CLASS
          indicates a module that is a class.
static char MODULE_TYPE_LOCALBEAN
          indicates a module that is a local bean.
static char MODULE_TYPE_REMOTEBEAN
          indicates a module that is a remote bean.
 
Method Summary
 ModuleData process(ModuleContext moduleContext, ModuleData inputModuleData)
          The process() method is called by the XI AF ModuleProcessor (MP) with the input message data and the context information.
 

Field Detail

MODULE_TYPE_LOCALBEAN

static final char MODULE_TYPE_LOCALBEAN
indicates a module that is a local bean.

See Also:
Constant Field Values

MODULE_TYPE_REMOTEBEAN

static final char MODULE_TYPE_REMOTEBEAN
indicates a module that is a remote bean.

See Also:
Constant Field Values

MODULE_TYPE_CLASS

static final char MODULE_TYPE_CLASS
indicates a module that is a class.

See Also:
Constant Field Values
Method Detail

process

ModuleData process(ModuleContext moduleContext,
                   ModuleData inputModuleData)
                   throws ModuleException
The process() method is called by the XI AF ModuleProcessor (MP) with the input message data and the context information. The module should return the updated or enriched ModulData, which is forwarded to the next module by the XI AF MP. Modules are successively called by the MP until there are no more Modules or an exception is thrown by one of the Module. If an exception is thrown, the onFault() method of the preceeding SModules are caled in the reverse order until there are no more SModules or the pivotting Module (any Module that sets module parameter mp.pivot to true) is reached.

Parameters:
moduleContext - The module context contains configuration data and other basic data such as channel ID
inputModuleData - Contains the message data as arbitrary type and evtentually further supplement data
Returns:
ModuleData The processed message data
Throws:
ModuleException - Raised when the module ends in a error condition. Cause should be set to XI AF MS MessagingException or RecoveryException depending on required retry behavior.


Copyright 2009 SAP AG Complete Copyright Notice