|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--uk.org.ogsadai.activity.Activity | +--uk.org.ogsadai.activity.ResultActivity
This is a special kind of activity used internally for processing any dangling outputs. A dangling output contained in a request that is that is not connected to the input of another activity in the request. The data processed by into these outputs is the data that is returned to the user in the response document.
Field Summary | |
private static java.lang.String |
COPYRIGHT_NOTICE
Copyright statement |
private static DAILogger |
LOG
Logger object for logging in this class |
private java.lang.StringBuffer |
mBuffer
Data written into here if it is strings. |
private java.io.ByteArrayOutputStream |
mByteArrayOutputStream
Data written into here if it is bytes. |
private BlockReader |
mInput
Data is read from here. |
Fields inherited from class uk.org.ogsadai.activity.Activity |
mContext, mExternalInputs, mExternalOutputs, mInternalInputs, mInternalOutputs |
Constructor Summary | |
(package private) |
ResultActivity(java.lang.String name,
BlockReader input)
Constructs an activity for a dangling output that will generate the data to be contained in the response. |
Method Summary | |
byte[] |
getResultData()
Gets the result data that has been generated by up-stream activities. |
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 |
private static final java.lang.String COPYRIGHT_NOTICE
private static final DAILogger LOG
private final BlockReader mInput
private final java.lang.StringBuffer mBuffer
private final java.io.ByteArrayOutputStream mByteArrayOutputStream
Constructor Detail |
ResultActivity(java.lang.String name, BlockReader input)
name
- Activity name.input
- A BlockReader
for a dangling output. This
must contain only blocks of String
,
org.w3c.dom.Node
or byte[]
data.Method Detail |
public void processBlock()
Activity
setCompleted
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 Activity
public final byte[] getResultData()
StringBuffer
containing the result data.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |