WebLogic Integration


com.bea.b2b.protocol
Interface PlugIn


Deprecated. The PlugIn interface represents a generic logic plug-in. Logic plug-ins are individual components or modules that perform specialized processing of business messages as they pass through the c-hub. At run time, logic plug-ins can intercept, process, and output business messages.

public interface PlugIn

Author:
Copyright © 2000, 2001 BEA Systems, Inc. All Rights Reserved.

Field Summary
static int EXCEPTION_CONTINUE
          Deprecated. Indicates that processing should continue to the next logic plug-in if a PlugInException is thrown.
static int EXCEPTION_STOP
          Deprecated. Indicates that processing should stop at this logic plug-in if a PlugInException is thrown.
static int EXCEPTION_UNWIND
          Deprecated. Indicates that processing should unwind if a PlugInException is thrown.
 
Method Summary
 int exceptionProcessingModel()
          Deprecated. Gets the current setting of the exception processing model (continue, stop, or unwind).
 java.lang.String getName()
          Deprecated. Gets the name of this logic plug-in.
 void init(java.util.Hashtable properties)
          Deprecated. Initializes this logic plug-in one time using the specified initialization settings.
 void process(MessageEnvelope env)
          Deprecated. Processes the specified message envelope.
 void shutDown()
          Deprecated. Shuts down this logic plug-in.
 void unwind(MessageEnvelope env, java.lang.Throwable t)
          Deprecated. Unwinds changes made by this logic plug-in.
 

Field Detail

EXCEPTION_UNWIND

public static final int EXCEPTION_UNWIND
Deprecated. 
Indicates that processing should unwind if a PlugInException is thrown. The business message does not continue to the next logic plug-in in the chain.

Use this option to reject a business message; to prevent its further progress through the c-hub; and to undo any changes made by this plug-in, along with any changes made by previous plug-ins in the chain. If an exception is thrown and this is the exception processing model, then the unwind method in this logic plug-in, as well as the unwind methods in all previous plug-ins in the chain, are invoked in reverse order. In effect, unwinding cancels all changes made by the chain.


EXCEPTION_CONTINUE

public static final int EXCEPTION_CONTINUE
Deprecated. 
Indicates that processing should continue to the next logic plug-in if a PlugInException is thrown.

Use this option to allow a business message to continue through the c-hub even if an error occurs during the execution of this logic plug-in.


EXCEPTION_STOP

public static final int EXCEPTION_STOP
Deprecated. 
Indicates that processing should stop at this logic plug-in if a PlugInException is thrown. The business message does not continue to the next logic plug-in in the chain.

Use this option to reject a business message and prevent its further progress through the c-hub.

Method Detail

exceptionProcessingModel

public int exceptionProcessingModel()
Deprecated. 
Gets the current setting of the exception processing model (continue, stop, or unwind).

Returns:
int One of the following values:

EXCEPTION_UNWIND (0) if the chain should unwind if an exception is thrown.

EXCEPTION_CONTINUE (1) if the chain should ignore the exception and continue processing the business message with the next logic plug-in.

EXCEPTION_STOP (2) if processing should stop at this logic plug-in.


init

public void init(java.util.Hashtable properties)
          throws PlugInException
Deprecated. 
Initializes this logic plug-in one time using the specified initialization settings.

Parameters:
properties - Name-value pairs that specify initialization information.
Throws:
PlugInException - If an error occurred during initialization.

shutDown

public void shutDown()
              throws PlugInException
Deprecated. 
Shuts down this logic plug-in. Use method to provide for an orderly shutdown if the logic plug-in is being removed.

Throws:
PlugInException - If an error occurs during shutdown.

getName

public java.lang.String getName()
Deprecated. 
Gets the name of this logic plug-in.

process

public void process(MessageEnvelope env)
             throws PlugInException
Deprecated. 
Processes the specified message envelope.

The process() method is invoked when processing a business message at various stages. When invoked, each logic plug-in has access to the information about the business message up to that point of the processing. What may be changed, however, is limited.

Parameters:
env - Message envelope containing the business message information gathered up to this point. Provides a place to store additional information as needed for processing this business message.
Throws:
PlugInException - If an error occurred during processing.

unwind

public void unwind(MessageEnvelope env,
                   java.lang.Throwable t)
Deprecated. 
Unwinds changes made by this logic plug-in.

The unwind() method is invoked automatically when an exception occurred during execution of a subsequent logic plug-in in the chain. In that subsequent logic plug-in, the exception processing model was configured to unwind the entire chain if an exception was thrown. Developers should implement this message to undo any changes made by this logic plug-in. For example, if this logic plug-in adds a record to a database, this method should removing the record.

Parameters:
env - Message envelope that was passed to process, possibly containing extra information from subsequent logic plug-ins in the chain.
t - Exception that triggered the unwind.

WebLogic Integration

WebLogic Integration (WLI)