org.glite.discovery
Interface ServiceDiscovery


public interface ServiceDiscovery

Interface to the service discovery subsystem.


Method Summary
 Service getService(java.lang.String serviceName)
          Gets the service with the given name.
 ServiceData[] getServiceData(java.lang.String serviceName)
          Gets the list of attributes (name/value pairs) associated with the given service.
 java.lang.String getServiceDataItem(java.lang.String serviceName, java.lang.String key)
          Gets a parameter value for the service.
 ServiceDetails getServiceDetails(java.lang.String serviceName)
          Gets all the available data on the given service.
 java.lang.String getServiceSite(java.lang.String serviceName)
          Returns the name of the site where the service runs.
 java.lang.String getServiceWSDL(java.lang.String serviceName)
          Returns a URL to the service WSDL.
 Service[] listAssociatedServices(java.lang.String serviceName, java.lang.String type, java.lang.String site, java.lang.String[] vos)
          Lists the available services that are associated with the specified service and that match the specified type, site and VOs.
 Service[] listAssociatedServices(java.lang.String serviceName, java.lang.String type, java.lang.String site, java.lang.String[] vos, boolean onlyListAvailable)
          Deprecated. The onlyListAvailable parameter is deprecated, @see listAssociatedServices(String,String,String,String[])
 Service[] listServices(java.lang.String type, java.lang.String site, java.lang.String[] vos)
          Lists all the available services matching the specified type, site and VOs.
 Service[] listServices(java.lang.String type, java.lang.String site, java.lang.String[] vos, boolean onlyListAvailable)
          Deprecated. The onlyListAvailable parameter is deprecated, @see listServices(String,String,String[])
 Service[] listServicesByData(ServiceData[] data, java.lang.String type, java.lang.String site, java.lang.String[] vos)
          Lists the available services matching the given service data (key/value pairs) and the specified type, site and VOs.
 Service[] listServicesByData(ServiceData[] data, java.lang.String type, java.lang.String site, java.lang.String[] vos, boolean onlyListAvailable)
          Deprecated. The onlyListAvailable parameter is deprecated, @see listServicesByData(ServiceData[],String,String,String[])
 

Method Detail

getServiceDataItem

public java.lang.String getServiceDataItem(java.lang.String serviceName,
                                           java.lang.String key)
                                    throws ServiceDiscoveryException
Gets a parameter value for the service.

Parameters:
serviceName - The name of the service.
key - The name of the parameter.
Returns:
The value of the parameter or null if the service/key combination can not be found.
Throws:
ServiceDiscoveryException - If the information system could not be accessed.

getService

public Service getService(java.lang.String serviceName)
                   throws ServiceDiscoveryException
Gets the service with the given name.

Parameters:
serviceName - The name of the service.
Returns:
A Service object or null if the service can not be found.
Throws:
ServiceDiscoveryException - If the information system could not be accessed.

getServiceDetails

public ServiceDetails getServiceDetails(java.lang.String serviceName)
                                 throws ServiceDiscoveryException
Gets all the available data on the given service.

Parameters:
serviceName - The name of the service.
Returns:
A ServiceDetails object containing all the data or null if the service can not be found.
Throws:
ServiceDiscoveryException - If the information system could not be accessed.

getServiceSite

public java.lang.String getServiceSite(java.lang.String serviceName)
                                throws ServiceDiscoveryException
Returns the name of the site where the service runs.

Parameters:
serviceName - The name of the service.
Returns:
The name of the site or null if the service can not be found.
Throws:
ServiceDiscoveryException - If the information system could not be accessed.

getServiceWSDL

public java.lang.String getServiceWSDL(java.lang.String serviceName)
                                throws ServiceDiscoveryException
Returns a URL to the service WSDL. Can be null if not a web service.

Parameters:
serviceName - The name of the service.
Returns:
The WSDL string or null if the service can not be found.
Throws:
ServiceDiscoveryException - If the information system could not be accessed.

getServiceData

public ServiceData[] getServiceData(java.lang.String serviceName)
                             throws ServiceDiscoveryException
Gets the list of attributes (name/value pairs) associated with the given service.

Parameters:
serviceName - The name of the service.
Returns:
An array of ServiceData objects containing name/value pairs. If the service does not exist or has no service data, an empty array is returned.
Throws:
ServiceDiscoveryException - If the information system could not be accessed.

listServices

public Service[] listServices(java.lang.String type,
                              java.lang.String site,
                              java.lang.String[] vos)
                       throws ServiceDiscoveryException
Lists all the available services matching the specified type, site and VOs.

Parameters:
type - The type of the requested services. To get services of all types, set as null.
site - The site of the requested services. To get services from all sites, set as null.
vos - The list of VOs the service is member of. To get services from all VOs, set as null.
Returns:
The list of matching services. If no services were found, an empty array is returned.
Throws:
ServiceDiscoveryException - If the information system could not be accessed.

listAssociatedServices

public Service[] listAssociatedServices(java.lang.String serviceName,
                                        java.lang.String type,
                                        java.lang.String site,
                                        java.lang.String[] vos)
                                 throws ServiceDiscoveryException
Lists the available services that are associated with the specified service and that match the specified type, site and VOs.

Parameters:
serviceName - The name of the service to which the others are associated.
type - The type of the requested services. To get services of all types, set as null.
site - The site of the requested services. To get services from all sites, set as null.
vos - The list of VOs the service is member of. To get services from all VOs, set as null.
Returns:
The list of matching services. If no services were found, an empty array is returned.
Throws:
ServiceDiscoveryException - If the information system could not be accessed.

listServicesByData

public Service[] listServicesByData(ServiceData[] data,
                                    java.lang.String type,
                                    java.lang.String site,
                                    java.lang.String[] vos)
                             throws ServiceDiscoveryException
Lists the available services matching the given service data (key/value pairs) and the specified type, site and VOs.

Parameters:
data - Array of ServiceData objects (key/value pairs) to match.
type - The type of the requested services. To get services of all types, set as null.
site - The site of the requested services. To get services from all sites, set as null.
vos - The list of VOs the service is member of. To get services from all VOs, set as null.
Returns:
The list of matching services. If no services were found, an empty array is returned.
Throws:
ServiceDiscoveryException - If the information system could not be accessed.

listServices

public Service[] listServices(java.lang.String type,
                              java.lang.String site,
                              java.lang.String[] vos,
                              boolean onlyListAvailable)
                       throws ServiceDiscoveryException
Deprecated. The onlyListAvailable parameter is deprecated, @see listServices(String,String,String[])

Lists all the services matching the specified type, site and VOs. If onlyListAvailable is true, only services that have an "available" status are returned.

Parameters:
type - The type of the requested services. To get services of all types, set as null.
site - The site of the requested services. To get services from all sites, set as null.
vos - The list of VOs the service is member of. To get services from all VOs, set as null.
onlyListAvailable - Only list available services.
Returns:
The list of matching services. If no services were found, an empty array is returned.
Throws:
ServiceDiscoveryException - If the information system could not be accessed.

listAssociatedServices

public Service[] listAssociatedServices(java.lang.String serviceName,
                                        java.lang.String type,
                                        java.lang.String site,
                                        java.lang.String[] vos,
                                        boolean onlyListAvailable)
                                 throws ServiceDiscoveryException
Deprecated. The onlyListAvailable parameter is deprecated, @see listAssociatedServices(String,String,String,String[])

Lists the services that are associated with the specified service and that match the specified type, site and VOs. If onlyListAvailable is true, only services that have an "available" status are returned.

Parameters:
serviceName - The name of the service to which the others are associated.
type - The type of the requested services. To get services of all types, set as null.
site - The site of the requested services. To get services from all sites, set as null.
vos - The list of VOs the service is member of. To get services from all VOs, set as null.
onlyListAvailable - Only list available services.
Returns:
The list of matching services. If no services were found, an empty array is returned.
Throws:
ServiceDiscoveryException - If the information system could not be accessed.

listServicesByData

public Service[] listServicesByData(ServiceData[] data,
                                    java.lang.String type,
                                    java.lang.String site,
                                    java.lang.String[] vos,
                                    boolean onlyListAvailable)
                             throws ServiceDiscoveryException
Deprecated. The onlyListAvailable parameter is deprecated, @see listServicesByData(ServiceData[],String,String,String[])

Lists the services matching the given service data (key/value pairs) and the specified type, site and VOs. If onlyListAvailable is true, only services that have an "available" status are returned.

Parameters:
data - Array of ServiceData objects (key/value pairs) to match.
type - The type of the requested services. To get services of all types, set as null.
site - The site of the requested services. To get services from all sites, set as null.
vos - The list of VOs the service is member of. To get services from all VOs, set as null.
onlyListAvailable - Only list available services.
Returns:
The list of matching services. If no services were found, an empty array is returned.
Throws:
ServiceDiscoveryException - If the information system could not be accessed.