uk.org.ogsadai.client.toolkit.activity.delivery
Class DeliverFromFile
java.lang.Object
|
+--uk.org.ogsadai.client.toolkit.activity.RequestComponent
|
+--uk.org.ogsadai.client.toolkit.activity.Activity
|
+--uk.org.ogsadai.client.toolkit.activity.delivery.DeliverFromFile
- public class DeliverFromFile
- extends Activity
This activity delivers data from a file on a data service's filesystem to another activity.
It has no input and one output - the data delivered.
- Author:
- The OGSA-DAI Project Team
Field Summary |
private static java.lang.String |
COPYRIGHT_NOTICE
Copyright statement |
private java.lang.String |
mFile
Source File |
private int |
mNoOfBytesToBlock
Number of bytes to aggregate into blocks |
Fields inherited from class uk.org.ogsadai.client.toolkit.activity.Activity |
|
Fields inherited from class uk.org.ogsadai.client.toolkit.activity.RequestComponent |
|
Constructor Summary |
DeliverFromFile()
Construct a request to read a file from a data service's filesystem. |
DeliverFromFile(java.lang.String file)
Construct a request to read a file from a data service's filesystem. |
DeliverFromFile(java.lang.String file, int noOfBytesInBlock)
Construct a request to read a file from a data service's filesystem. |
Method Summary |
protected java.lang.String |
generateXML()
Generates the XML representing the activity. |
ActivityOutput |
getOutput()
Gets the activity's only output - the file content. |
void |
setBlockSize(int noOfBytesInBlock)
Set the number of bytes to aggregate into blocks. |
void |
setFile(java.lang.String file)
Set the file to read. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
COPYRIGHT_NOTICE
private static final java.lang.String COPYRIGHT_NOTICE
-
Copyright statement
- See Also:
- Constant Field Values
mFile
private java.lang.String mFile
-
Source File
mNoOfBytesToBlock
private int mNoOfBytesToBlock
-
Number of bytes to aggregate into blocks
DeliverFromFile
public DeliverFromFile()
-
Construct a request to read a file from a data service's filesystem.
DeliverFromFile
public DeliverFromFile(java.lang.String file)
-
Construct a request to read a file from a data service's filesystem.
- Parameters:
file
- File to read.
- Throws:
java.lang.IllegalArgumentException
- If file
is null
or "".
DeliverFromFile
public DeliverFromFile(java.lang.String file,
int noOfBytesInBlock)
-
Construct a request to read a file from a data service's filesystem.
- Parameters:
file
- File to read.
noOfBytesInBlock
- Number of bytes to aggregate into blocks.
- Throws:
java.lang.IllegalArgumentException
- If file
is null
or "" or if noOfBytesInBlock
is 0 or less.
setFile
public void setFile(java.lang.String file)
-
Set the file to read.
-
- Parameters:
file
- File to read.
- Throws:
java.lang.IllegalArgumentException
- If file
is null
or "".
setBlockSize
public void setBlockSize(int noOfBytesInBlock)
-
Set the number of bytes to aggregate into blocks.
-
- Parameters:
noOfBytesInBlock
- Number of bytes to aggregate into blocks.
- Throws:
java.lang.IllegalArgumentException
- If noOfBytesInBlock
is 0 or less.
getOutput
public ActivityOutput getOutput()
-
Gets the activity's only output - the file content.
-
- Returns:
- the activity output.
generateXML
protected java.lang.String generateXML()
- Description copied from class:
RequestComponent
-
Generates the XML representing the activity. This XML can then be inserted into a perform document that is sent to a data service.
-
- Specified by:
generateXML
in class Activity
-
- Returns:
- the XML for the activity
- See Also:
Activity.generateXML()