|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--uk.org.ogsadai.engine.Activity
|
+--uk.org.ogsadai.activity.delivery.AbstractDeliverFromAddressActivity
This abstract class is subclassed by DeliverFromURLActivity and DeliverFromFileActivity. It
contains methods to connect to a java.io.InputStream and pull all the information on that
stream into OGSA-DAI, either in one byte array block, or via multiple set sized byte array blocks.
The output can then be connected to the input of another activity, such as an
SQLBulkLoadRowSetActivity.
| Field Summary | |
protected boolean |
mBlockMode
Size of blocks placed onto the stream |
protected byte[] |
mBuffer
Buffer to hold data |
protected java.io.ByteArrayOutputStream |
mByteBuffer
ByteArrayOutputStream to hold data |
protected java.lang.String |
mFromAddress
String version of address to read data from. |
protected java.io.InputStream |
mFromInputStream
Data contained at URL read from this input stream. |
protected BlockWriter |
mOutput
The data retrieved from the URL is written to this output. |
| Fields inherited from class uk.org.ogsadai.engine.Activity |
mContext, mExternalInputs, mExternalOutputs, mInternalInputs, mInternalOutputs |
| Constructor Summary | |
AbstractDeliverFromAddressActivity(org.w3c.dom.Element element)
Dafault constructor |
|
| Method Summary | |
void |
initialise()
This method can be overridden by subclasses to perform any initialisation they require before the process method iterations begin. |
void |
processBlock()
Performs an iteration of the processing of an activity. |
abstract void |
processFirst()
Implementations of this method MUST create the protected java.io.InputStream object mInputStream for use in the processBlock() method. |
protected void |
setupBlocking(org.w3c.dom.Element fromElement)
|
protected void |
setupOutput(org.w3c.dom.Element toElement)
Gets the name of the activity output from the toLocal element. |
| Methods inherited from class uk.org.ogsadai.engine.Activity |
cleanUp, connectsTo, getActivityConfiguration, getName, getObservableStatus, getProperties, getStatus, hasActivityConfiguration, hasProperties, setCompleted, setError |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.lang.String mFromAddress
protected java.io.InputStream mFromInputStream
protected boolean mBlockMode
protected byte[] mBuffer
protected final java.io.ByteArrayOutputStream mByteBuffer
protected BlockWriter mOutput
| Constructor Detail |
public AbstractDeliverFromAddressActivity(org.w3c.dom.Element element)
throws ActivitySystemException,
ActivityUserException
| Method Detail |
protected void setupBlocking(org.w3c.dom.Element fromElement)
throws ActivitySystemException
ActivitySystemExceptionprotected void setupOutput(org.w3c.dom.Element toElement)
toElement -
public void initialise()
throws ActivityUserException
Activityprocess 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.
initialise in class ActivityActivityUserException - If a user problem prevents the activity from
initialising.public abstract void processFirst()
mInputStream for use in the processBlock() method.
processFirst in class ActivityActivity.processFirst()public void processBlock()
ActivitysetCompleted method to indicate that processing is complete,
or the setError method if an error occurs that will prevent
the processing from completing.
processBlock in class ActivityActivity.processBlock()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||