|
|||||||||||
| 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.WSRFDataService
| Field Summary | |
protected ResourceID |
mResource
|
| Constructor Summary | |
WSRFDataService(java.lang.String handle)
|
|
WSRFDataService(java.lang.String handle,
ResourceID resourceID)
|
|
| Method Summary | |
void |
close()
Used to terminate a clients use of a Data Service. |
ActivityMetaData |
getActivityMetaData(java.lang.String activityName)
Retrieves meta data for the specified activity from the data service. |
java.lang.Object |
getBlock()
Gets one block from the complete data set from the DT output stream. |
ConnectionProperty |
getConnectionProperty(javax.xml.namespace.QName name)
Obtain a connection property with the specified name. |
DataResourceInfo |
getDataResourceInfo()
Retrieves the data resource information from the data service. |
java.net.URL |
getDataTransportURL()
Obtain the URL of the data service implementing the data transport interface |
java.lang.Object |
getFully()
Gets the entire data set from the Data Transport output stream in one operation. |
java.lang.Object |
getNBlocks(int numberOfBlocks)
Gets a number of blocks from the complete data set from the DT output stream as a single block. |
javax.xml.namespace.QName[] |
getPortTypes()
Returns the port types that this service implements |
Property[] |
getProperties(javax.xml.namespace.QName[] names)
Obtain multiple properties from a service in one request |
Property |
getProperty(javax.xml.namespace.QName name)
Obtain a property of the service or the resource |
javax.xml.namespace.QName[] |
getPropertyNames()
Obtain the names of the available properties |
ResourceID |
getResourceID()
Get the ID of the resource this service communicates with |
ResourceID[] |
getResourceIDs()
Obtain the resource IDs of the resources that are associated with this service |
RequestStatus |
getStatus()
Gets the status of the current request. |
java.lang.String |
getStreamID()
Obtain the stream ID of the input or output stream |
java.lang.String[] |
getSupportedActivities()
Retrieves the names of the supported activities from the service. |
java.net.URL |
getURL()
Obtain the URL of the service |
DAIVersion |
getVersion()
|
Response |
perform(Request request)
Sends the request document to a data service. |
Response |
perform(RequestComponent component)
Sends a single activity request to the data service. |
void |
ping()
Contacts the service to check it is running. |
void |
pollUntilRequestCompleted(int pollInterval)
Polls the data service for the request status and blocks until the status is 'COMPLETED'. |
void |
pollUntilRequestCompleted(int pollInterval,
int timeoutPeriod)
Polls the data service for the request status and blocks until the status is 'COMPLETED'. |
boolean |
putBlock(java.lang.Object data)
Puts one block from a larger data set in to the DT input stream. |
boolean |
putClosingBlock()
Signals to the DT input stream that all blocks have been sent, so processing at the data service can be completed. |
boolean |
putFully(java.lang.Object data)
Puts the entire data set in to the DT input stream in one operation. |
void |
setConnectionProperty(ConnectionProperty property)
Configure the connection with a property. |
void |
setResourceID(ResourceID id)
Set the ID of the resource this service communicates with |
void |
setStreamID(java.lang.String streamID)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected ResourceID mResource
| Constructor Detail |
public WSRFDataService(java.lang.String handle)
throws java.net.MalformedURLException
handle -
public WSRFDataService(java.lang.String handle,
ResourceID resourceID)
throws ServiceCommsException,
java.net.MalformedURLException
handle - | Method Detail |
public Response perform(Request request)
throws PerformException,
UnsupportedActivityException,
AuthorisationException,
ActivityException,
ResourceException,
ServiceCommsException,
ServerException
DataService
perform in interface DataServicerequest - Request specifying the
work to be performed at the data service.
Response from the data service
containing the status of the request
and any output results.
ServiceCommsException - If there was an error communicating with
the service.
PerformException
ActivityException - If an activity produces an error when
executed at the service, causing the
request to fail.
UnsupportedActivityException
AuthorisationException
ResourceException
ServerException
public Response perform(RequestComponent component)
throws PerformException,
UnsupportedActivityException,
AuthorisationException,
ActivityException,
ResourceException,
ServiceCommsException,
ServerException
DataService
This is a shortcut when the request consists of only one activity.
It is functionally equivalent to:
perform( new ActivityRequest( new Activity[] { activity } ) )
perform in interface DataServicecomponent - Activity to be performed.
Response from the data service
containing the status of the request
and any output results.
ServiceCommsException - If there was an error communicating with
the service.
PerformException
ActivityException - If an activity produces an error when
executed at the service, causing the
request to fail.
UnsupportedActivityException
AuthorisationException
ResourceException
ServerException
public RequestStatus getStatus()
throws ServiceCommsException,
ResourceException
DataService
getStatus in interface DataServiceServiceCommsException - If there was an error communicating with
the service.
ResourceException
public void pollUntilRequestCompleted(int pollInterval)
throws RequestStatusException,
ResourceException,
ServiceCommsException,
java.lang.IllegalArgumentException
DataServiceRequestStatusException
is thrown.
pollUntilRequestCompleted in interface DataServicepollInterval - time (in milliseconds) between polls
java.lang.IllegalArgumentException - If the poll internal less than or
equal to 0.
RequestStatusException - If the status shows that the requent is
not progressing smoothly.
ServiceCommsException - If there was an error communicating with
the service.
ResourceException
public void pollUntilRequestCompleted(int pollInterval,
int timeoutPeriod)
throws RequestStatusException,
ResourceException,
ServiceCommsException,
java.lang.IllegalArgumentException
DataService
If at any time the status indicates that the request is not
progressing smoothly a RequestStatusException
is thrown.
If the status has not reached COMPLETED within the specififed
timeout period a RequestStatusException is thrown.
This method does not timeout. It will only terminate when the status showns the request is completed or in error, or when an error occurs contacting the service.
pollUntilRequestCompleted in interface DataServicepollInterval - time (in milliseconds) between pollstimeoutPeriod - time (in millisconds) to wait before giving up
java.lang.IllegalArgumentException - If the poll internal is less than or
equal to 0.
RequestStatusException - If the status shows that the requent is
not progressing smoothly.
ServiceCommsException - If there was an error communicating with
the service.
ResourceException
public DataResourceInfo getDataResourceInfo()
throws ServiceCommsException,
ResourceException
DataService
getDataResourceInfo in interface DataServiceServiceCommsException - If there was an error communicating with the
service.
ResourceException
public java.lang.String[] getSupportedActivities()
throws ResourceException,
ServiceCommsException
DataService
getSupportedActivities in interface DataServiceServiceCommsException - If there was an error communicating with the
service.
ResourceException
public ActivityMetaData getActivityMetaData(java.lang.String activityName)
throws ResourceException,
ServiceCommsException
DataService
getActivityMetaData in interface DataServiceactivityName - the name of a supported activity
ResourceException
ServiceCommsException
public DAIVersion getVersion()
throws ServiceCommsException,
ServerException
getVersion in interface DAIServiceServiceCommsException
ServerException
public java.lang.Object getFully()
throws AuthorisationException,
ResourceException,
ServiceCommsException,
ServerException
DataTransport
getFully in interface DataTransportServiceCommsException - If there is a problem communicating with the data service
ServerException
AuthorisationException
ResourceException
public java.lang.Object getNBlocks(int numberOfBlocks)
throws DataFormatException,
ServiceCommsException
DataTransportnull if there are no
more blocks to retrieve.
getNBlocks in interface DataTransportnumberOfBlocks - The number of blocks to fetch from the DT output stream at once. These blocks
will be amalgamated into a single block
null if there are no more blocks to retrieve
ServiceCommsException - If there is a problem communicating with the service.
DataFormatException - If there is a problem with the data.
public java.lang.Object getBlock()
throws AuthorisationException,
ResourceException,
ServiceCommsException,
ServerException
DataTransportnull if there are
no more blocks to retrieve.
getBlock in interface DataTransportnull if there are no more blocks to retrieve
ServerException - If there is a problem at the server
AuthorisationException
ServiceCommsException - If there is a problem communicating with the service.
ResourceException
public boolean putFully(java.lang.Object data)
throws AuthorisationException,
ResourceException,
DataFormatException,
ServiceCommsException,
ServerException
DataTransport
putFully in interface DataTransportdata - The data set to put in to the DataTransport input stream
ResourceException
DataFormatException - If there is a problem with the data.
AuthorisationException
ServiceCommsException - If there is a problem communicating with the DataTransport input stream
ServerException
public boolean putBlock(java.lang.Object data)
throws DataFormatException,
AuthorisationException,
ResourceException,
ServiceCommsException,
ServerException
DataTransportputClosingBlock method should be called to signal to
the data service that all the data has been sent.
putBlock in interface DataTransportdata - The block to put in to the DataTransport input stream
DataFormatException - If there is a problem with the data, or the
putClosingBlock method has already been called.
ResourceException
AuthorisationException
ServiceCommsException - If there is a problem communicating with the DataTransport input stream
ServerException
public boolean putClosingBlock()
throws AuthorisationException,
ResourceException,
ServiceCommsException,
ServerException
DataTransportputClosingBlock has been
called, the putBlock method should no longer be used.
putClosingBlock in interface DataTransportServiceCommsException - If there is a problem communicating with the DataTransport input stream
ServerException
AuthorisationException
ResourceExceptionpublic java.net.URL getURL()
Service
getURL in interface Service
public ResourceID[] getResourceIDs()
throws ServiceCommsException,
ServerException
Service
getResourceIDs in interface ServiceServerException
ServiceCommsExceptionpublic javax.xml.namespace.QName[] getPortTypes()
Service
getPortTypes in interface Servicepublic void setConnectionProperty(ConnectionProperty property)
Service
setConnectionProperty in interface Serviceproperty - a connection propertypublic ConnectionProperty getConnectionProperty(javax.xml.namespace.QName name)
Service
getConnectionProperty in interface Servicename - property name
public Property getProperty(javax.xml.namespace.QName name)
throws ServiceCommsException,
DataFormatException,
InvalidPropertyNameException,
ResourceException
Properties
getProperty in interface Propertiesname - qualified name of the property
ServiceCommsException - if there was a problem communicating with the service
InvalidPropertyNameException - if the property name was invalid
DataFormatException - if the response returned by the service did not have
the expected format
ResourceException - if the resource could not be found or the ID was invalid
public Property[] getProperties(javax.xml.namespace.QName[] names)
throws ServiceCommsException,
DataFormatException,
ResourceException,
InvalidPropertyNameException
Properties
getProperties in interface Propertiesnames - an array of qualified names
ServiceCommsException - if there was a problem communicating with the service
InvalidPropertyNameException - if one of the property names was invalid
DataFormatException - if the response did not have the expected format
ResourceException - if the resource could not be found or the ID was valid
public javax.xml.namespace.QName[] getPropertyNames()
throws ServiceCommsException
Properties
getPropertyNames in interface PropertiesServiceCommsException - if there was a problem communicating with the servicepublic ResourceID getResourceID()
getResourceID in interface DataTransportpublic void setResourceID(ResourceID id)
setResourceID in interface Serviceid - resource IDpublic java.lang.String getStreamID()
DataTransport
getStreamID in interface DataTransportpublic void setStreamID(java.lang.String streamID)
public java.net.URL getDataTransportURL()
DataTransport
getDataTransportURL in interface DataTransport
public void ping()
throws ServiceCommsException
Service
ping in interface ServiceServiceCommsException - If the service cannot be contacted.
public void close()
throws ServiceCommsException,
ServiceTerminationException
DataServiceThe method will destroy an OGSI (GT3) Data Service. It will do nothing on other platforms.
close in interface DataServiceServiceTerminationException - If there was a problem when trying to terminate the service
ServiceCommsException - If there was a problem accessing the service
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||