|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--uk.org.ogsadai.client.toolkit.activity.RequestComponent | +--uk.org.ogsadai.client.toolkit.activity.Activity | +--uk.org.ogsadai.client.toolkit.activity.examples.DemoExternalInput
Activity to demonstrate the use of an external input. An input stream is created, a number of integer blocks that will be written to the stream is specified, the activity sums these and outputs the total.
The activity has one dynamically generated input upon which a specific number of integer blocks are received and summed. The activity has one output - the sum of the values of each block.
Field Summary | |
private static java.lang.String |
COPYRIGHT_NOTICE
Copyright statement |
private int |
mNumInputBlocks
Number of blocks that will be send to the external input |
private java.lang.String |
mStreamName
Name of the external input - typically created server side |
Fields inherited from class uk.org.ogsadai.client.toolkit.activity.Activity |
|
Fields inherited from class uk.org.ogsadai.client.toolkit.activity.RequestComponent |
|
Constructor Summary | |
DemoExternalInput(int nInputBlocks,
java.lang.String streamName)
Constructs the activity. |
Method Summary | |
protected java.lang.String |
generateXML()
Generates the XML representing the activity. |
ActivityOutput |
getOutput()
Gets the activity output - the sum of the values of each block. |
int |
getSum()
Gets the sum of the values written to the input stream. |
Methods inherited from class uk.org.ogsadai.client.toolkit.activity.Activity |
addInput, addOutput, addOutputs, getDataResourceID, getInputParameters, getOutputParameters, getOutputs, replaceSpecialCharacters, setDataResourceID, setInput |
Methods inherited from class uk.org.ogsadai.client.toolkit.activity.RequestComponent |
getDataService, getName, getSession, setDataService, setSession |
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 int mNumInputBlocks
private java.lang.String mStreamName
Constructor Detail |
public DemoExternalInput(int nInputBlocks, java.lang.String streamName)
nInputBlocks
- Number of input blocks of data the activity can expect to
receive.streamName
- Input stream upon which data will be received.
java.lang.IllegalArgumentException
- If streamName
is null
.Method Detail |
public ActivityOutput getOutput()
public int getSum() throws DataFormatException, NoActivityOutputException
NoActivityOutputException
- if there is no output data or the data has not yet been
processed to this output or the activity that generates
this output has not yet been executed.
DataFormatException
- if the output from the activity cannot be parsed into an
integer.protected java.lang.String generateXML()
RequestComponent
generateXML
in class Activity
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |