|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--uk.org.ogsadai.engine.Activity
This is the abstract base class for all Activity
implementations. It manages the internal and external inputs and outputs,
general activity termination.
| Field Summary | |
protected ActivityContext |
mContext
Provides access to the data pipes, user credentials etc. |
protected java.lang.String[] |
mExternalInputs
The names of the external inputs to the activity. |
protected java.lang.String[] |
mExternalOutputs
The names of the external outputs to the activity. |
protected java.lang.String[] |
mInternalInputs
The names of the internal inputs of the activity. |
protected java.lang.String[] |
mInternalOutputs
The names of the internal outputs of the activity. |
| Constructor Summary | |
Activity(org.w3c.dom.Element element)
Constructs an activity using the specified element. |
|
Activity(java.lang.String name)
Constructs an activity with the specified name. |
|
| Method Summary | |
protected void |
cleanUp()
This method can be overridden by any Activity
implementations that need to free up resources in the event of an error
or intermediate termination of the activity processing. |
boolean |
connectsTo(Activity activity)
Indicates whether or not the specified activity is connected to this activity. |
protected ActivityConfiguration |
getActivityConfiguration()
Accesses the ActivityConfiguration object, if applicable. |
java.lang.String |
getName()
Gets the name of the activity. |
protected ObservableStatus |
getObservableStatus()
Gets the current status of the activity as an ObservableStatus that can be observed using
Observer implementations. |
protected java.util.Properties |
getProperties()
Accesses the activity configuration properties. |
protected Status |
getStatus()
Gets the current status of the activity. |
protected boolean |
hasActivityConfiguration()
Indicates whether or not this activity has an ActivityConfiguration object. |
protected boolean |
hasProperties()
Indicates whether or not this activity has any configuration properties. |
protected void |
initialise()
This method can be overridden by subclasses to perform any initialisation they require before the process method iterations begin. |
protected abstract void |
processBlock()
Performs an iteration of the processing of an activity. |
protected void |
processFirst()
This method is called during the first iteration of processing an activity. |
protected void |
setCompleted()
An Activity implementation should call this method to
indicate that the processing is complete. |
protected void |
setError(ActivityException cause)
An Activity implementation should call this method to
indicate that there has been an error during processing. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.lang.String[] mInternalInputs
protected java.lang.String[] mInternalOutputs
protected java.lang.String[] mExternalInputs
protected java.lang.String[] mExternalOutputs
protected ActivityContext mContext
| Constructor Detail |
public Activity(org.w3c.dom.Element element)
throws ActivitySystemException,
ActivityUserException
element - The Element to configure
the activity with.
ActivitySystemException - If there is a problem constructing the
activity due to an implementation
error or OGSA-DAI confguration problem.
ActivityUserException - If there is a problem constructing the
activity due to a user mistake such as
an invalid setting.public Activity(java.lang.String name)
name - the String name of the activity| Method Detail |
protected void cleanUp()
Activity
implementations that need to free up resources in the event of an error
or intermediate termination of the activity processing.
public final java.lang.String getName()
String containing the activity's name.protected final Status getStatus()
Status object indicating the activity's current
status.protected final ObservableStatus getObservableStatus()
ObservableStatus that can be observed using
Observer implementations.
ObservableStatus object indicating the activity's
current status.
protected void initialise()
throws ActivitySystemException,
ActivityUserException
process method iterations begin.
This might be used for setting up convenient fields to reference objects
contained in the context. It shouldn't be used for opening resources.
That should be done in processFirst.
ActivitySystemException - If a system problem prevents the activity from
initialising.
ActivityUserException - If a user problem prevents the activity from
initialising.protected void processFirst()
protected abstract void processBlock()
setCompleted method to indicate that processing is complete,
or the setError method if an error occurs that will prevent
the processing from completing.
protected final void setCompleted()
Activity implementation should call this method to
indicate that the processing is complete. This sets the activity status.
protected final void setError(ActivityException cause)
Activity implementation should call this method to
indicate that there has been an error during processing. This sets
the activity status and calls the cleanUp method.
cause - an Exception describing the reason for the
error.protected java.util.Properties getProperties()
Properties object containing the activity
properties or null if this activity does not have
any propertiesprotected boolean hasProperties()
getProperties method.
true if the activity does has configuration,
otherwise falseprotected boolean hasActivityConfiguration()
ActivityConfiguration object. If so, it can be accessed
using the getActivityConfiguration method.
true if the activity does have an
ActivityConfiguration object, otherwise falseprotected ActivityConfiguration getActivityConfiguration()
ActivityConfiguration object, if applicable.
Properties referencehasActivityConfiguration()public boolean connectsTo(Activity activity)
activity - the activity to check for a connection
true if the specified activity is connected to
this activity, otherwise false
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||