uk.org.ogsadai.activity.files
Class FileAccessActivity

java.lang.Object
  |
  +--uk.org.ogsadai.engine.Activity
        |
        +--uk.org.ogsadai.activity.files.AbstractFileActivity
              |
              +--uk.org.ogsadai.activity.files.FileAccessActivity

public class FileAccessActivity
extends AbstractFileActivity


Field Summary
 
Fields inherited from class uk.org.ogsadai.activity.files.AbstractFileActivity
mConnectionManager, mTopDir
 
Fields inherited from class uk.org.ogsadai.engine.Activity
mContext, mExternalInputs, mExternalOutputs, mInternalInputs, mInternalOutputs
 
Constructor Summary
FileAccessActivity(org.w3c.dom.Element element)
           
 
Method Summary
 void initialise()
          Perform some checks on the connection managers's configuration, including whether the connection manager is a FileSystemConnectionManager and the top-level directory exists and really is a directory.
 void processBlock()
          Performs an iteration of the processing of an activity.
 
Methods inherited from class uk.org.ogsadai.engine.Activity
cleanUp, connectsTo, getActivityConfiguration, getName, getObservableStatus, getProperties, getStatus, hasActivityConfiguration, hasProperties, processFirst, setCompleted, setError
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileAccessActivity

public FileAccessActivity(org.w3c.dom.Element element)
                   throws ActivitySystemException,
                          ActivityUserException
Method Detail

initialise

public void initialise()
                throws ActivityUserException,
                       ActivitySystemException
Description copied from class: AbstractFileActivity
Perform some checks on the connection managers's configuration, including whether the connection manager is a FileSystemConnectionManager and the top-level directory exists and really is a directory. It exposes this directory in the protected field mTopDir which sub-classes should use in order to obtain the context within which their file access may occur.

Sub-classes may override this method if they want to perform additional initialisation, but should call super.initialise() to ensure that the checks contained here are executed.

Overrides:
initialise in class AbstractFileActivity
Throws:
ActivityUserException - If there is a user problem intialising the activity, like the top-level directory specified in the connection configuration does not exist.
ActivitySystemException - If there is a problem intialising the activity, like not using the FileSystemConnectionManager connection manager.

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