Activity - deliverFromFile

Activity Type: Delivery

Description

Reads the data contained in a file on the service container's local filesystem, and writes it to an output. This output can be connected to the input of another activity or delivered back to the user in the response document.

Example

To deliver the data from a file at c:/temp/file.ext to an output named fileData in blocks of no larger than 1024 bytes:

<deliverFromFile name="retrieval">
  <fromFile blockSizeInBytes="1024">c:/temp/file.ext</fromFile>
  <toLocal name="fileData"/>
</deliverFromFile>

Specification

Element deliverFromFile:

Input and Output Types

Warnings to Service Deployers

This activity is not deployed by default because it can be used by clients to potentially access any file on your server. This activity is provided for developing and testing OGSA-DAI applications.

If you intend to use files as data resources then you should support access and manipulation of these only via the file activities.

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_file.xsd

Class

uk.org.ogsadai.activity.delivery.DeliverFromFileActivity

Client Toolkit Class

uk.org.ogsadai.client.toolkit.activity.delivery.DeliverFromFile