Activity - deliverFromURL
Activity Type: Delivery
Description
Retrieves data from a URL and writes it to an output.
Example
Retrieves data from
ftp://some.source.org/file/file.ext in blocks
of maximum size 1024 bytes, and writes each block to an output named
outputData:
<deliverFromURL name="retrieval">
<fromURL blockSizeInBytes="1024">ftp://some.source.org/file/file.ext</fromURL>
<toLocal name="outputData"/>
</deliverFromURL >
Specification
Element deliverFromURL:
-
Attribute name - unique name for the
activity within the scope of a request.
-
Element fromURL (required) - the URL from which
the data is to be retrieved. This URL should be of form:
-
scheme://[username:password@]host[:port]/location[?parameters]
.
-
scheme can be one of http, https, ftp.
- Attribute blockSizeInBytes (optional) -
number of bytes to block together before placing the block on the
output stream. If this attribute is not specified then the entire
contents of the file is placed on the output stream as a single byte
array block.
-
toLocal (required) - output stream.
-
Attribute name - name of this activity's
output stream.
Input and Output Types
-
Output: toLocal —
byte[] blocks
Warning To Service Users
If the attribute blockSizeInBytes is not
specified then the entire contents of the file is retrieved into
memory - this may cause the server's Java Virtual Machine to run out
of memory.
Data Resource Accessor
This activity can operate with any data resource accessor.
XML Schema
OGSA-DAI/schema/ogsadai/xsd/activities/deliver_from_url.xsd
Class
uk.org.ogsadai.activity.delivery.DeliverFromURLActivity
Client Toolkit Class
uk.org.ogsadai.client.toolkit.activity.delivery.DeliverFromURL