|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--uk.org.ogsadai.client.toolkit.GenericServiceFetcher
Generic service fetcher class which creates proxies for managing communications with data services depending upon the OGSA-DAI distribution used to deploy the service. This information is deduced by accessing namespaces within the service's WSDL which is accessed via its URL.
Field Summary | |
private static java.lang.String |
COPYRIGHT_NOTICE Copyright statement |
private static GenericServiceFetcher |
mInstance Singleton instance of the service fetcher |
Constructor Summary | |
GenericServiceFetcher() |
Method Summary | |
private ConfigurableDataService |
findConfigurableDataService(java.lang.String url, java.lang.String resourceID) Returns a proxy managing communications with a configurable data service. |
private DataService |
findDataService(java.lang.String url, java.lang.String resourceID) Returns a proxy managing communications with a configurable data service. |
ConfigurableDataService |
getConfigurableDataService(java.lang.String url, java.lang.String resourceID) Returns a proxy managing communications with a configurable data service. |
DataService |
getDataService(java.lang.String url, java.lang.String resourceID) Create a proxy for the data service specified by the given URL and data service resource ID. |
static GenericServiceFetcher |
getInstance() Returns the singleton instance of this service fetcher. |
private java.lang.String |
getWSDL(java.net.URL url) Reads the WSDL of a service at the given URL. |
WSIDataService |
getWSIDataService(java.lang.String url, java.lang.String resourceID) Returns a proxy managing communications with an OGSA-DAI WSI data service. |
WSRFDataService |
getWSRFDataService(java.lang.String url, java.lang.String resourceID) Returns a proxy managing communications with an OGSA-DAI WSRF data service. |
private boolean |
isWSI(java.lang.String wsdl) Indicates whether the given WSDL document specifies an OGSA-DAI WSI service. |
private boolean |
isWSRF(java.lang.String wsdl) Indicates whether the given WSDL document specifies an OGSA-DAI WSRF service. |
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 static GenericServiceFetcher mInstance
Constructor Detail |
public GenericServiceFetcher()
Method Detail |
public static GenericServiceFetcher getInstance()
public DataService getDataService(java.lang.String url, java.lang.String resourceID) throws java.net.MalformedURLException, java.lang.IllegalArgumentException, ServiceCommsException, ServiceTypeException
ServiceFetcher
getDataService
in interface ServiceFetcher
url
- URL of a data serviceresourceID
- Data service resource ID. The method does not check whether the service exposes the resource.java.net.MalformedURLException
- if URL
is malformed.ServiceCommsException
- if there is a problem contacting the service.java.lang.IllegalArgumentException
- if either of the arguments are null
.ServiceTypeException
- if the service at url
is either not an OGSA-DAI service or is not implemented in a version of OGSA-DAI compatible with this version of the client toolkit.public ConfigurableDataService getConfigurableDataService(java.lang.String url, java.lang.String resourceID) throws java.net.MalformedURLException, java.lang.IllegalArgumentException, ServiceCommsException, ServiceTypeException
url
- Service URLresourceID
- Data service resource ID. The method does not check whether the service exposes this resource.ConfigurableWSIDataService
or ConfigurableWSRFDataService
.java.lang.IllegalArgumentException
- if url
is null
java.net.MalformedURLException
- if the service URL is malformed.ServiceCommsException
- if there is a problem in communicating with the service.ServiceTypeException
- if the service at url
is either not an OGSA-DAI service or is not implemented in a version of OGSA-DAI compatible with this version of the client toolkit.public WSRFDataService getWSRFDataService(java.lang.String url, java.lang.String resourceID) throws java.lang.IllegalArgumentException, java.net.MalformedURLException
The method does not check whether the client toolkit is compatible with the service type.
url
- Service URLresourceID
- Data service resource ID. The method does not check whether the service exposes this resource.java.lang.IllegalArgumentException
- if url
is null
java.net.MalformedURLException
- if the service URL is malformed.public WSIDataService getWSIDataService(java.lang.String url, java.lang.String resourceID) throws java.lang.IllegalArgumentException, java.net.MalformedURLException
The method does not check whether the client toolkit is compatible with the service type.
url
- Service URLresourceID
- Data service resource ID. The method does not check whether the service exposes this resource.java.lang.IllegalArgumentException
- if url
is null
java.net.MalformedURLException
- if the service URL is malformed.private DataService findDataService(java.lang.String url, java.lang.String resourceID) throws java.net.MalformedURLException, java.lang.IllegalArgumentException, ServiceCommsException, ServiceTypeException
url
- Service URLresourceID
- Data service resource ID. The method does not check whether the service exposes this resource.ConfigurableWSIDataService
or ConfigurableWSRFDataService
.java.net.MalformedURLException
- if the service URL is malformed.ServiceCommsException
- if there is a problem in communicating with the service.ServiceTypeException
- if the service at url
is either not an OGSA-DAI service or is not implemented in a version of OGSA-DAI compatible with this version of the client toolkit.java.lang.IllegalArgumentException
private ConfigurableDataService findConfigurableDataService(java.lang.String url, java.lang.String resourceID) throws java.net.MalformedURLException, java.lang.IllegalArgumentException, ServiceCommsException, ServiceTypeException
url
- Service URLresourceID
- Data service resource ID. The method does not check whether the service exposes this resource.ConfigurableWSIDataService
or ConfigurableWSRFDataService
.java.net.MalformedURLException
- if the service URL is malformed.ServiceCommsException
- if there is a problem in communicating with the service.ServiceTypeException
- if the service at url
is either not an OGSA-DAI service or is not implemented in a version of OGSA-DAI compatible with this version of the client toolkit.java.lang.IllegalArgumentException
private java.lang.String getWSDL(java.net.URL url) throws java.io.IOException
url
- URL of the servicejava.io.IOException
- if there was a problem reading the remote documentprivate boolean isWSRF(java.lang.String wsdl)
This is the case if the service WSDL is defined in the https://ogsadai.org.uk/namespaces/2005/10/service/wsrf/dataservice/service
namespace.
wsdl
- WSDL document as a string.true
if the service is an OGSA-DAI WSRF one, false
otherwiseprivate boolean isWSI(java.lang.String wsdl)
This is the case if the service WSDL is defined in the https://ogsadai.org.uk/namespaces/2005/10/service/wsi/dataservice/service
namespace.
wsdl
- WSDL document as a string.true
if the service is an OGSA-DAI WSI one, false
otherwise
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |