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

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

public class DeliverToDT
extends Activity

This activity delivers data to a stream exposed by a data service resource exposed by a service.

It has one input - the data to deliver - and no output.

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  GSIProtectionLevel mProtectionLevel
          GSI Protection level to use when contacting remove service
protected  ResourceID mResourceID
          Resource exposed by destination service
protected  ServiceType mServiceType
          Service type.
protected  SessionStreamID mStreamID
          Input stream of a session exposed by resource.
protected  java.net.URL mURL
          Destination 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
DeliverToDT()
          Constructs a request to write data to a service with default data transfer mode as full.
DeliverToDT(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.
 void setDataTransportMode(DataTransportMode mode)
          Sets the data transfer mode.
 void setDataTransportOutput(DataTransport service)
          Sets up the destination service, resource, session and stream to be that held in the given data transport service proxy.
 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 setInput(ActivityOutput input)
          Sets the input of this activity to be the output from another activity that will provide the data to be delivered.
 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
Destination service URL.


mResourceID

protected ResourceID mResourceID
Resource exposed by destination 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.


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

DeliverToDT

public DeliverToDT()
Constructs a request to write data to a service with default data transfer mode as full.

Destination information must be set using the set methods. The activity providing the input data must be set using setInput.


DeliverToDT

public DeliverToDT(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.

The activity providing the input data must be set using setInput.

Parameters:
url - Service to which data is to be delivered.
resourceID - Resource to which data is to be delivered.
streamID - Session and stream to which data is to be delivered.
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

setDataTransportOutput

public void setDataTransportOutput(DataTransport service)
Sets up the destination 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 delivered.
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 delivered.
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 delivered.
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.

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.

setInput

public final void setInput(ActivityOutput input)
Sets the input of this activity to be the output from another activity that will provide the data to be delivered.

Parameters:
input - Output from another activity.
Throws:
java.lang.IllegalArgumentException - If input is null.

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