de.uka.cmtm.serviceregistry.query
Class DefaultServiceLocator

java.lang.Object
  extended by de.uka.cmtm.serviceregistry.query.DefaultServiceLocator
All Implemented Interfaces:
ServiceLocator

public class DefaultServiceLocator
extends Object
implements ServiceLocator

A Basic implementation of ServiceLocator that uses a ServiceProfileLocator to look up service profiles an a ServiceInstanceLocator to fetch conforming instances.

Author:
tilmann

Constructor Summary
DefaultServiceLocator(String uddiInquiryUrl, String digReasonerUrl, String serviceOntologyUrl, String upperServiceOntologyUrl, String topOntologyUrl)
          Creates a new DefaultServiceLocator
 
Method Summary
 void addServiceLocatorEventListener(ServiceLocatorEventListener listener)
          Sets a ServiceLocatorEventListener to be notified of events during search
 List<ServiceInfo> findServices(ServiceParameter searchParameter)
          This method can be used to search for services suitable to the given searchParameters.
 void removeServiceLocatorEventListener(ServiceLocatorEventListener listener)
          Removes a previously set ServiceLocatorEventListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultServiceLocator

public DefaultServiceLocator(String uddiInquiryUrl,
                             String digReasonerUrl,
                             String serviceOntologyUrl,
                             String upperServiceOntologyUrl,
                             String topOntologyUrl)
                      throws InstantiationException
Creates a new DefaultServiceLocator

Throws:
InstantiationException
Method Detail

findServices

public List<ServiceInfo> findServices(ServiceParameter searchParameter)
                               throws IOException
This method can be used to search for services suitable to the given searchParameters. The resulting list may also contain services that do not perfectly match the parameters. This is indicated with a relevance below 1.

Specified by:
findServices in interface ServiceLocator
Parameters:
searchParameter - the parameters the services shoud have
Returns:
a list of search results sorted by relevance
Throws:
IOException

addServiceLocatorEventListener

public void addServiceLocatorEventListener(ServiceLocatorEventListener listener)
Sets a ServiceLocatorEventListener to be notified of events during search

Specified by:
addServiceLocatorEventListener in interface ServiceLocator
Parameters:
listener - the ServiceLocatorEventListener to be set

removeServiceLocatorEventListener

public void removeServiceLocatorEventListener(ServiceLocatorEventListener listener)
Removes a previously set ServiceLocatorEventListener

Specified by:
removeServiceLocatorEventListener in interface ServiceLocator
Parameters:
listener - the ServiceLocatorEventListener to be removed