|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--uk.org.ogsadai.client.toolkit.wsrf.WSRFDataTransport
Client-side stub for OGSA-DAI WSRF data services transport operations. This class handles the details of SOAP request building, submission and response parsing.
Field Summary | |
private static java.lang.String |
COPYRIGHT_NOTICE Copyright statement |
private SOAPCallFactory |
mCallFactory Factory for creating SOAPCall objects with the correct settings. |
private ResourceID |
mResource ID of the current resource of interest |
private SessionStreamID |
mSessionStreamID ID of the current session and stream of interest |
private java.net.URL |
mURL URL of the service |
Constructor Summary | |
WSRFDataTransport(java.net.URL url) Construct a new OGSA-DAI WSRF data service stub from the given URL. |
|
WSRFDataTransport(java.net.URL url, ResourceID resourceID, SessionStreamID stream, SOAPCallFactory callFactory) Construct a new OGSA-DAI WSRF data transport service from the given URL, resource ID, stream ID and the SOAP call factory. |
|
WSRFDataTransport(java.net.URL url, ResourceID id, SOAPCallFactory callFactory) Construct a new OGSA-DAI WSRF data service stub from the given URL configured to communicate with the given resource. |
Method Summary | |
private void |
addAddressingHeaders(SOAPCall call, ResourceID id) Generates headers with the given resource ID for a SOAP request. |
private void |
generateHeaders(SOAPCall call) Generates WSRF headers for a SOAP request. |
java.lang.Object |
getBlock() Gets a single block of data from the output stream of a data service resource. |
java.net.URL |
getDataTransportURL() Obtain the URL of the data service. |
java.lang.Object |
getFully() Gets an entire data set from the output stream of a data service resource in one go. |
java.lang.Object |
getNBlocks(int numberOfBlocks) Gets an number of blocks of data from the output stream of a data service resource in one go. |
ResourceID |
getResourceID() Gets the default resource. |
SessionStreamID |
getSessionStreamID() Gets the session stream ID - the session and stream of that session exposed by the data service resource of interest. |
void |
putBlock(java.lang.Object data) Puts one block of data onto a data service resource input stream. |
void |
putClosingBlock() Inform a data service resource that it can close an input stream as all data has been forwarded. |
void |
putFully(java.lang.Object data) Puts an entire data set onto a data service resource input stream in one go. |
void |
setConnectionProperty(ConnectionProperty property) Configure the service stub with the specified ConnectionProperty . |
void |
setResourceID(ResourceID id) Sets the default resource. |
void |
setSessionStreamID(SessionStreamID sessionStreamID) Sets the session stream ID - the session and stream of that session exposed by the data service resource of interest. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final java.lang.String COPYRIGHT_NOTICE
private java.net.URL mURL
private SessionStreamID mSessionStreamID
private ResourceID mResource
private final SOAPCallFactory mCallFactory
Constructor Detail |
public WSRFDataTransport(java.net.URL url) throws java.lang.IllegalArgumentException
url
- URL of the servicejava.lang.IllegalArgumentException
- if url
is null
public WSRFDataTransport(java.net.URL url, ResourceID id, SOAPCallFactory callFactory) throws java.lang.IllegalArgumentException
url
- URL of the serviceid
- Resource ID.callFactory
-java.lang.IllegalArgumentException
- if url
or id
is null
public WSRFDataTransport(java.net.URL url, ResourceID resourceID, SessionStreamID stream, SOAPCallFactory callFactory)
url
- URL of the serviceresourceID
- Resource IDstream
- Stream identifiercallFactory
- SOAP call factoryMethod Detail |
public void setSessionStreamID(SessionStreamID sessionStreamID) throws java.lang.IllegalArgumentException
DataTransport
setSessionStreamID
in interface DataTransport
sessionStreamID
- Session stream identifierjava.lang.IllegalArgumentException
public SessionStreamID getSessionStreamID()
DataTransport
getSessionStreamID
in interface DataTransport
public void setResourceID(ResourceID id) throws java.lang.IllegalArgumentException
DataTransport
setResourceID
in interface DataTransport
id
- Resource IDjava.lang.IllegalArgumentException
public ResourceID getResourceID()
DataTransport
getResourceID
in interface DataTransport
public java.net.URL getDataTransportURL()
DataTransport
getDataTransportURL
in interface DataTransport
public java.lang.Object getFully() throws ServerException, AuthorisationException, RequestException, ResourceUnknownException, ResourceBusyException, ServiceCommsException
DataTransport
getFully
in interface DataTransport
ResourceUnknownException
- If the resource is unknown to the service.ResourceBusyException
- If the resource is busy.RequestException
- If there is a problem with the client's request e.g there is no such session.AuthorisationException
- If the client is not authorised to access the service, resource, session or stream.ServiceCommsException
- If there was an error communicating with the service.ServerException
- If there was an error server-side.public java.lang.Object getNBlocks(int numberOfBlocks) throws ServerException, AuthorisationException, RequestException, ResourceUnknownException, ResourceBusyException, ServiceCommsException
DataTransport
getNBlocks
in interface DataTransport
numberOfBlocks
- Number of blocks to get.ServiceConstants.NO_MORE_DATA
if there is no more data to retrieve.RequestException
- If there is a problem with the client's request e.g there is no such session.ResourceUnknownException
- If the resource is unknown to the service.ServerException
- If there was an error server-side.ServiceCommsException
- If there was an error communicating with the service.AuthorisationException
- If the client is not authorised to access the service, resource, session or stream.ResourceBusyException
- If the resource is busy.public java.lang.Object getBlock() throws ServerException, AuthorisationException, RequestException, ResourceUnknownException, ResourceBusyException, ServiceCommsException
DataTransport
getBlock
in interface DataTransport
ServiceConstants.NO_MORE_DATA
if there is no more data to retrieve.AuthorisationException
- If the client is not authorised to access the service, resource, session or stream.ResourceUnknownException
- If the resource is unknown to the service.RequestException
- If there is a problem with the client's request e.g there is no such session.ServiceCommsException
- If there was an error communicating with the service.ServerException
- If there was an error server-side.ResourceBusyException
- If the resource is busy.public void putFully(java.lang.Object data) throws ServerException, AuthorisationException, RequestException, ResourceUnknownException, ResourceBusyException, ServiceCommsException
DataTransport
putFully
in interface DataTransport
data
- The complete set of data.ServiceCommsException
- If there was an error communicating with the service.ResourceUnknownException
- If the resource is unknown to the service.RequestException
- if there is a problem with the client's request e.g there is no such session.AuthorisationException
- If the client is not authorised to access the service, resource, session or stream.ServerException
- If there was an error server-side.ResourceBusyException
- if the resource is busy.public void putBlock(java.lang.Object data) throws ServerException, AuthorisationException, RequestException, ResourceUnknownException, ResourceBusyException, ServiceCommsException
DataTransport
putClosingBlock
method should be called to signal to the data service resource that all the data has been forwarded.
putBlock
in interface DataTransport
data
- Block of data.ServerException
- If there was an error server-side.AuthorisationException
- If the client is not authorised to access the service, resource, session or stream.ResourceBusyException
- if the resource is busy.ResourceUnknownException
- If the resource is unknown to the service.ServiceCommsException
- If there was an error communicating with the service.RequestException
- if there is a problem with the client's request e.g there is no such session.public void putClosingBlock() throws ServerException, AuthorisationException, RequestException, ResourceUnknownException, ResourceBusyException, ServiceCommsException
DataTransport
putBlock
method should no longer be called.
putClosingBlock
in interface DataTransport
ResourceBusyException
- if the resource is busy.ServerException
- If there was an error server-side.ResourceUnknownException
- If the resource is unknown to the service.AuthorisationException
- If the client is not authorised to access the service, resource, session or stream.ServiceCommsException
- If there was an error communicating with the service.RequestException
- if there is a problem with the client's request e.g there is no such session.public void setConnectionProperty(ConnectionProperty property)
ConnectionProperty
.
setConnectionProperty
in interface DataTransport
property
- A connection propertyjava.lang.IllegalArgumentException
- if property
is null
generateHeaders
private void generateHeaders(SOAPCall call)
throws java.net.MalformedURLException
Generates WSRF headers for a SOAP request.
Parameters:
call
- SOAPCall
object managing SOAP invocations.
java.net.MalformedURLException
- If the service URL is malformed.private void addAddressingHeaders(SOAPCall call, ResourceID id) throws java.net.MalformedURLException
call
- SOAP call to be configuredid
- Resource IDjava.net.MalformedURLException
- If the service URL is malformed.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |