uk.org.ogsadai.activity
Class ObserverActivity

java.lang.Object
  |
  +--uk.org.ogsadai.activity.Activity
        |
        +--uk.org.ogsadai.activity.ObserverActivity

class ObserverActivity
extends Activity

This is a special kind of activity used internally for observing the status of an activity that is driven by an external output. The activity will complete processing only when the activity that it has been observing reaches a finished state.

Author:
The OGSA-DAI Project Team

Field Summary
private static java.lang.String COPYRIGHT_NOTICE
          Copyright statement
private static DAILogger LOG
          Logger object for logging in this class
private  boolean mWaiting
          Indicates whether we need to wait for the activity to finish.
 
Fields inherited from class uk.org.ogsadai.activity.Activity
mContext, mExternalInputs, mExternalOutputs, mInternalInputs, mInternalOutputs
 
Constructor Summary
(package private) ObserverActivity(Activity activity)
          Constructs an ObserverActivity that will observe the status of another activity.
 
Method Summary
 void processBlock()
          Performs an iteration of the processing of an activity.
 
Methods inherited from class uk.org.ogsadai.activity.Activity
cleanUp, configureContext, connectsTo, createOutputPipe, getActivityConfiguration, getActivityName, getAllOutputs, getCause, getExternalInputs, getExternalOutputs, getInputs, getName, getObservableStatus, getOutputs, getProperties, getSession, getStatus, hasActivityConfiguration, hasProperties, initialise, process, processFirst, setActivityConfiguration, setActivityName, setCompleted, setError, setProperties, terminate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COPYRIGHT_NOTICE

private static final java.lang.String COPYRIGHT_NOTICE
Copyright statement

See Also:
Constant Field Values

LOG

private static final DAILogger LOG
Logger object for logging in this class


mWaiting

private boolean mWaiting
Indicates whether we need to wait for the activity to finish.

Constructor Detail

ObserverActivity

ObserverActivity(Activity activity)
Constructs an ObserverActivity that will observe the status of another activity. This activity should be one that is driven by an external output.

Parameters:
activity - An Activity that is driven by an external output.
Method Detail

processBlock

public void processBlock()
Description copied from class: Activity
Performs an iteration of the processing of an activity. This may involve reading a block of input data and writing a block of output data, or may involve some other kind of processing. When an activity is processed by the OGSA-DAI engine, this method will be invoked repeatedly until the activity either completes or stops due to an error or termination call. An implementation of this method should invoke the setCompleted method to indicate that processing is complete, or the setError method if an error occurs that will prevent the processing from completing.

Specified by:
processBlock in class Activity