com.ibm.processingbean
Class ProcessingBean

java.lang.Object
  |
  +--com.ibm.processingbean.ProcessingBean
Direct Known Subclasses:
CryptoTransformation

public abstract class ProcessingBean
extends java.lang.Object
implements java.io.Serializable

This class is a base class for all non-visual(!) beans. This abstract class provides implementation for firing events,(!) such as(!) FetchArgumentsEvent, TriggerNextActionEvent, ActionErrorEvent,(!) and PropertyChangeEvent,(!) which are to be fired by these beans. This class provides methods for triggering the computation of (!) bean(triggerAction). It should be subclassed to provide the concrete implementation.

See Also:
FetchArgumentsEvent, FetchArgumentsListener, TriggerNextActionEvent, TriggerNextActionListener, ActionErrorEvent, ActionErrorListener, Serialized Form

Constructor Summary
ProcessingBean()
          Default constructor
 
Method Summary
 void addActionErrorListener(ActionErrorListener listener)
          Adds (!) ActionErrorListener to the listeners list.
 void addFetchArgumentsListener(FetchArgumentsListener listener)
          Adds (!) FetchArgumentsListener to the listeners(!) list.
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
          Adds (!) PropertyChangeListener to the listeners list.
 void addTriggerNextActionListener(TriggerNextActionListener listener)
          Adds (!) TriggerNextActionListener to the listeners list.
 void removeActionErrorListener(ActionErrorListener listener)
          Removes (!) ActionErrorListener from the listeners(!) list.
 void removeFetchArgumentsListener(FetchArgumentsListener listener)
          Removes (!) FetchArgumentsListener from the listeners(!) list.
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
          Removes (!) PropertyChangeListener from the listeners(!) list.
 void removeTriggerNextActionListener(TriggerNextActionListener listener)
          Removes (!) TriggerNextActionListener from the listeners(!) list.
 void triggerAction()
          Initiates the computation of the bean.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProcessingBean

public ProcessingBean()
Default constructor
Method Detail

addActionErrorListener

public void addActionErrorListener(ActionErrorListener listener)
Adds (!) ActionErrorListener to the listeners list.
Parameters:
listener - The ActionErrorListener to be added
Throws:
java.lang.IllegalArgumentException - if the value passed is null
See Also:
ActionErrorListener, removeActionErrorListener(com.ibm.processingbean.events.ActionErrorListener)

addFetchArgumentsListener

public void addFetchArgumentsListener(FetchArgumentsListener listener)
Adds (!) FetchArgumentsListener to the listeners(!) list.
Parameters:
listener - The FetchArgumentsListener to be added
Throws:
java.lang.IllegalArgumentException - if the value passed is null
See Also:
FetchArgumentsListener, removeFetchArgumentsListener(com.ibm.processingbean.events.FetchArgumentsListener)

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds (!) PropertyChangeListener to the listeners list.
Parameters:
listener - The PropertyChangeListener to be added
Throws:
java.lang.IllegalArgumentException - if the value passed is null
See Also:
PropertyChangeListener, removePropertyChangeListener(java.beans.PropertyChangeListener)

addTriggerNextActionListener

public void addTriggerNextActionListener(TriggerNextActionListener listener)
Adds (!) TriggerNextActionListener to the listeners list.
Parameters:
listener - The TriggerNextActionListener to be added
Throws:
java.lang.IllegalArgumentException - if the value passed is null
See Also:
TriggerNextActionListener, removeTriggerNextActionListener(com.ibm.processingbean.events.TriggerNextActionListener)

removeActionErrorListener

public void removeActionErrorListener(ActionErrorListener listener)
Removes (!) ActionErrorListener from the listeners(!) list.
Parameters:
listener - The ActionErrorListener to be removed
Throws:
java.lang.IllegalArgumentException - if the value passed is null
See Also:
ActionErrorListener, addActionErrorListener(com.ibm.processingbean.events.ActionErrorListener)

removeFetchArgumentsListener

public void removeFetchArgumentsListener(FetchArgumentsListener listener)
Removes (!) FetchArgumentsListener from the listeners(!) list.
Parameters:
listener - The FetchArgumentsListener to be removed
Throws:
java.lang.IllegalArgumentException - if the value passed is null
See Also:
FetchArgumentsListener, addFetchArgumentsListener(com.ibm.processingbean.events.FetchArgumentsListener)

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes (!) PropertyChangeListener from the listeners(!) list.
Parameters:
listener - The PropertyChangeListener to be removed
Throws:
java.lang.IllegalArgumentException - if the value passed is null
See Also:
PropertyChangeListener, addPropertyChangeListener(java.beans.PropertyChangeListener)

removeTriggerNextActionListener

public void removeTriggerNextActionListener(TriggerNextActionListener listener)
Removes (!) TriggerNextActionListener from the listeners(!) list.
Parameters:
listener - The TriggerNextActionListener to be removed
Throws:
java.lang.IllegalArgumentException - if the value passed is null
See Also:
TriggerNextActionListener, addTriggerNextActionListener(com.ibm.processingbean.events.TriggerNextActionListener)

triggerAction

public void triggerAction()
Initiates the computation of the bean. This method causes FetchArgumentsEvent to be fired. This event is used for setting the input or control arguments of its subclass. After firing this event, it checks the precondition. If the precondition is satisfied, it calls the computeFunction(whose implementation is defined in the subclass) else ActionErrorEvent is fired. If the computeFunction is successful, TriggerNextActionEvent is fired else ActionErrorEvent is fired.