uk.org.ogsadai.client.toolkit.activity.delivery
Class DeliverFromDT

java.lang.Object
  |
  +--uk.org.ogsadai.client.toolkit.activity.RequestComponent
        |
        +--uk.org.ogsadai.client.toolkit.activity.Activity
              |
              +--uk.org.ogsadai.client.toolkit.activity.delivery.DeliverFromDT

public class DeliverFromDT
extends Activity

This activity retrieves data from a stream exposed by a data service resource exposed by a service.

It has no inputs and one output - the data retrieved.

Author:
The OGSA-DAI Project Team

Field Summary
private static java.lang.String COPYRIGHT_NOTICE
          Copyright statement
protected  GSIAuthorizationType mAuthorizationType
          GSI authorization type to use when contacting remove service
protected  DataTransportMode mMode
          Data transfer mode.
protected  int mNumberOfBlocks
          Number of data blocks to transfer in each go
protected  GSIProtectionLevel mProtectionLevel
          GSI Protection level to use when contacting remove service
protected  ResourceID mResourceID
          Resource exposed by source service
protected  ServiceType mServiceType
          Service type.
protected  SessionStreamID mStreamID
          Input stream of a session exposed by resource.
protected  java.net.URL mURL
          Source service URL.
 
Fields inherited from class uk.org.ogsadai.client.toolkit.activity.Activity
 
Fields inherited from class uk.org.ogsadai.client.toolkit.activity.RequestComponent
 
Constructor Summary
DeliverFromDT()
          Constructs a request to retrieve data from a service with default data transfer mode as full.
DeliverFromDT(java.net.URL url, ResourceID resourceID, SessionStreamID streamID, DataTransportMode mode)
          Constructs a request to write data to a service with default data transfer mode as full.
 
Method Summary
protected  java.lang.String generateXML()
          Generates the XML representing the activity.
 ActivityOutput getOutput()
          Gets the activity's only output.
 void setDataTransportInput(DataTransport service)
          Sets up the input service, resource, session and stream to be that held in the given data transport service proxy.
 void setDataTransportMode(DataTransportMode mode)
          Sets the data transfer mode.
 void setDataTransportResourceID(ResourceID id)
          Sets the ID of the destination resource.
 void setDataTransportStreamID(SessionStreamID streamID)
          Sets the ID of the destination session and stream.
 void setDataTransportURL(java.net.URL url)
          Sets the URL of the destination service.
 void setGSISecureConversation(GSIProtectionLevel protectionLevel, GSIAuthorizationType authorizationType)
          Sets that GSI Secure Conversation message level security should be used when communicating with the remote service.
 void setNumberOfBlocks(int numberOfBlocks)
          Set the number of blocks to transfer at a time.
 void setServiceType(ServiceType serviceType)
          Sets the type (OGSA-DAI WSI or OGSA-DAI WSRF) of the destination service if known.
 
Methods inherited from class uk.org.ogsadai.client.toolkit.activity.Activity
addInput, addOutput, addOutputs, getDataResourceID, getInputParameters, getOutputParameters, getOutputs, replaceSpecialCharacters, setDataResourceID, setInput
 
Methods inherited from class uk.org.ogsadai.client.toolkit.activity.RequestComponent
getDataService, getName, getSession, setDataService, setSession
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COPYRIGHT_NOTICE

private static final java.lang.String COPYRIGHT_NOTICE
Copyright statement

See Also:
Constant Field Values

mURL

protected java.net.URL mURL
Source service URL.


mResourceID

protected ResourceID mResourceID
Resource exposed by source service


mStreamID

protected SessionStreamID mStreamID
Input stream of a session exposed by resource.


mServiceType

protected ServiceType mServiceType
Service type.


mMode

protected DataTransportMode mMode
Data transfer mode.


mNumberOfBlocks

protected int mNumberOfBlocks
Number of data blocks to transfer in each go


mProtectionLevel

protected GSIProtectionLevel mProtectionLevel
GSI Protection level to use when contacting remove service


mAuthorizationType

protected GSIAuthorizationType mAuthorizationType
GSI authorization type to use when contacting remove service

Constructor Detail

DeliverFromDT

public DeliverFromDT()
Constructs a request to retrieve data from a service with default data transfer mode as full.

Source information must be set using the set methods.


DeliverFromDT

public DeliverFromDT(java.net.URL url,
                     ResourceID resourceID,
                     SessionStreamID streamID,
                     DataTransportMode mode)
Constructs a request to write data to a service with default data transfer mode as full.

Parameters:
url - Service from which data is to be retrieved.
resourceID - Resource from which data is to be retrieved.
streamID - Session and stream from which data is to be retrieved.
mode - Data transfer mode.
Throws:
java.lang.IllegalArgumentException - If url is null. If resourceID is null. If streamID is null. If mode is null.
Method Detail

setDataTransportInput

public void setDataTransportInput(DataTransport service)
Sets up the input service, resource, session and stream to be that held in the given data transport service proxy.

Parameters:
service - Data transport service proxy.
Throws:
java.lang.IllegalArgumentException - If service is null.

setDataTransportURL

public void setDataTransportURL(java.net.URL url)
Sets the URL of the destination service.

Parameters:
url - Service to which data is to be retrieved.
Throws:
java.lang.IllegalArgumentException - If url is null

setDataTransportResourceID

public void setDataTransportResourceID(ResourceID id)
Sets the ID of the destination resource.

Parameters:
id - Resource to which data is to be retrieved.
Throws:
java.lang.IllegalArgumentException - If url is null

setDataTransportStreamID

public void setDataTransportStreamID(SessionStreamID streamID)
Sets the ID of the destination session and stream.

Parameters:
streamID - Session and stream to which data is to be retrieved.
Throws:
java.lang.IllegalArgumentException - If streamID is null.

setServiceType

public void setServiceType(ServiceType serviceType)
Sets the type (OGSA-DAI WSI or OGSA-DAI WSRF) of the destination service if known.

Parameters:
serviceType - Service type.

setDataTransportMode

public void setDataTransportMode(DataTransportMode mode)
Sets the data transfer mode.

Parameters:
mode - Data transfer mode.
Throws:
java.lang.IllegalArgumentException - If mode is null.

setNumberOfBlocks

public void setNumberOfBlocks(int numberOfBlocks)
Set the number of blocks to transfer at a time. Using this setting can improve performance of the transfer, as a SOAP message does not have to be generated for every single block. Using this setting means the transfer of data will be set to mode DataTransportMode.BLOCK

Parameters:
numberOfBlocks - Number of blocks to transfer in one go.
Throws:
java.lang.IllegalArgumentException - If numberOfBlocks is less than or equal to zero.

setGSISecureConversation

public void setGSISecureConversation(GSIProtectionLevel protectionLevel,
                                     GSIAuthorizationType authorizationType)
Sets that GSI Secure Conversation message level security should be used when communicating with the remote service. When communicating with remote services using GSI message level security you must ensure that the client's credential has been delegated so that the activity can use the client's credential to contact the remote service.

Parameters:
protectionLevel - protection level required for the communication between the activity and the remote service.
authorizationType - type of authoization the activity should perform in its role as a client talking to the remote service.

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