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 from a file on the container's filesystem to another activity.

It has no input and one output.

Author:
The OGSA-DAI Project Team

Constructor Summary
DeliverFromFile()
          Constructs a request to read a file from the container's filesystem.
DeliverFromFile(java.lang.String file)
          Constructs a request to read a file from the container's filesystem.
DeliverFromFile(java.lang.String file, int noOfBytesInBlock)
          Constructs a request to read a file from the container's filesystem.
 
Method Summary
protected  java.lang.String generateXML()
          Generates the XML representing the activity.
 ActivityOutput getOutput()
          Gets the activity's only output.
 void setBlockSize(int noOfBytesInBlock)
          Set the no of bytes to block by.
 void setFile(java.lang.String file)
          Set the File.
 
Methods inherited from class uk.org.ogsadai.client.toolkit.activity.Activity
addInput, addOutput, addOutputs, getDataResourceID, getDataServiceStub, getInputParameters, getOutputParameters, getOutputs, replaceSpecialCharacters, setDataResourceID, setDataServiceStub, setInput
 
Methods inherited from class uk.org.ogsadai.client.toolkit.activity.RequestComponent
getName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeliverFromFile

public DeliverFromFile()
Constructs a request to read a file from the container's filesystem.


DeliverFromFile

public DeliverFromFile(java.lang.String file)
Constructs a request to read a file from the container's filesystem.

Parameters:
file -
Throws:
java.lang.IllegalArgumentException - If file is null.

DeliverFromFile

public DeliverFromFile(java.lang.String file,
                       int noOfBytesInBlock)
Constructs a request to read a file from the container's filesystem.

Parameters:
file -
noOfBytesInBlock -
Throws:
java.lang.IllegalArgumentException - If file is null or empty or if noOfBytesInBlock is 0 or less.
Method Detail

setFile

public void setFile(java.lang.String file)
Set the File.

Parameters:
file -
Throws:
java.lang.IllegalArgumentException - If file is null or empty

setBlockSize

public void setBlockSize(int noOfBytesInBlock)
Set the no of bytes to block by.

Parameters:
noOfBytesInBlock -
Throws:
java.lang.IllegalArgumentException - If noOfBytesInBlock is 0 or less.

getOutput

public ActivityOutput getOutput()
Gets the activity's only output.

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()