|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--uk.org.ogsadai.client.toolkit.wsi.WSIDataTransport
Client-side stub for OGSA-DAI WSI 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 |
mResourceID
ID of the current resource of interest |
private java.net.URL |
mServiceURL
URL of the service |
private SessionStreamID |
mSessionStreamID
ID of the current session and stream of interest |
| Constructor Summary | |
WSIDataTransport(java.net.URL url,
ResourceID resourceID,
SessionStreamID sessionStreamID,
SOAPCallFactory factory)
Construct a new OGSA-DAI WSI data service stub from the given URL configured to communicate with the given resource, in particular the given stream of the given session. |
|
WSIDataTransport(java.net.URL url,
ResourceID id,
SOAPCallFactory callFactory)
Construct a new OGSA-DAI WSI data service stub from the given URL configured to communicate with the given resource. |
|
WSIDataTransport(java.net.URL serviceURL,
SOAPCallFactory callFactory)
Construct a new OGSA-DAI WSI data service stub from the given URL. |
|
| Method Summary | |
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. |
private java.lang.String |
getServiceURL()
Generates the full service URL using the resource ID. |
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)
Sets a connection property for the service stub. |
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 mServiceURL
private SessionStreamID mSessionStreamID
private ResourceID mResourceID
private final SOAPCallFactory mCallFactory
| Constructor Detail |
public WSIDataTransport(java.net.URL serviceURL,
SOAPCallFactory callFactory)
throws java.lang.IllegalArgumentException
serviceURL - URL of the servicecallFactory - the factory to use for creating SOAP calls
java.lang.IllegalArgumentException - if url is null
public WSIDataTransport(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 WSIDataTransport(java.net.URL url,
ResourceID resourceID,
SessionStreamID sessionStreamID,
SOAPCallFactory factory)
throws java.lang.IllegalArgumentException
url - URL of the serviceresourceID - Resource ID.sessionStreamID - Session and stream ID.factory - factory for creating SOAP calls
java.lang.IllegalArgumentException - if url, id or
sessionStreamID are null.| Method Detail |
public void setSessionStreamID(SessionStreamID sessionStreamID)
throws java.lang.IllegalArgumentException
DataTransport
setSessionStreamID in interface DataTransportsessionStreamID - Session stream identifier
java.lang.IllegalArgumentExceptionpublic SessionStreamID getSessionStreamID()
DataTransport
getSessionStreamID in interface DataTransport
public void setResourceID(ResourceID id)
throws java.lang.IllegalArgumentException
DataTransport
setResourceID in interface DataTransportid - Resource ID
java.lang.IllegalArgumentExceptionpublic ResourceID getResourceID()
DataTransport
getResourceID in interface DataTransportpublic 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 DataTransportResourceUnknownException - 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 DataTransportnumberOfBlocks - 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 DataTransportServiceConstants.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 DataTransportdata - 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
DataTransportputClosingBlock method should be called to
signal to the data service resource that all the data has been
forwarded.
putBlock in interface DataTransportdata - 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
DataTransportputBlock method should no longer be
called.
putClosingBlock in interface DataTransportResourceBusyException - 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)
setConnectionProperty in interface DataTransportproperty - A connection property
java.lang.IllegalArgumentException - if property is null
private java.lang.String getServiceURL()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||