uk.org.ogsadai.client.toolkit.activity.delivery
Class DeliverFromURL
java.lang.Object
|
+--uk.org.ogsadai.client.toolkit.activity.RequestComponent
|
+--uk.org.ogsadai.client.toolkit.activity.Activity
|
+--uk.org.ogsadai.client.toolkit.activity.delivery.DeliverFromURL
- public class DeliverFromURL
- extends Activity
This activity delivers from a URL to another activity.
It has no input and one output - the data from the URL.
- Author:
- The OGSA-DAI Project Team
Field Summary |
private static java.lang.String |
COPYRIGHT_NOTICE
Copyright statement |
private int |
mNoOfBytesToBlock
Number of bytes to aggregate into blocks |
private java.lang.String |
mURI
Source URI. |
Fields inherited from class uk.org.ogsadai.client.toolkit.activity.Activity |
|
Fields inherited from class uk.org.ogsadai.client.toolkit.activity.RequestComponent |
|
Constructor Summary |
DeliverFromURL()
Constructs a request to read data from URL. |
DeliverFromURL(java.lang.String url)
Constructs a request to read data from URL. |
DeliverFromURL(java.lang.String url, int noOfBytesInBlock)
Constructs a request to read file from URL. |
Method Summary |
protected java.lang.String |
generateXML()
Generates the XML representing the activity. |
ActivityOutput |
getOutput()
Gets the activity's only output - the data from the URL. |
void |
setBlockSize(int noOfBytesInBlock)
Set the number of bytes to aggregate into blocks. |
void |
setURL(java.lang.String url)
Set the URL. |
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
mURI
private java.lang.String mURI
-
Source URI.
mNoOfBytesToBlock
private int mNoOfBytesToBlock
-
Number of bytes to aggregate into blocks
DeliverFromURL
public DeliverFromURL()
-
Constructs a request to read data from URL.
DeliverFromURL
public DeliverFromURL(java.lang.String url)
-
Constructs a request to read data from URL.
- Parameters:
url
- The URL.
- Throws:
java.lang.IllegalArgumentException
- If url
is null
or not a valid URI or URL.
DeliverFromURL
public DeliverFromURL(java.lang.String url,
int noOfBytesInBlock)
-
Constructs a request to read file from URL.
- Parameters:
url
- The URL.
noOfBytesInBlock
- Number of bytes to aggregate into blocks.
- Throws:
java.lang.IllegalArgumentException
- If url
is null
or empty or not a valid URI or URL or if noOfBytesInBlock
is 0 or less.
setURL
public void setURL(java.lang.String url)
-
Set the URL.
-
- Parameters:
url
- The URL.
- Throws:
java.lang.IllegalArgumentException
- If url
is null
or not a valid URI or URL.
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 data from the URL.
-
- 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()