org.openvpms.esci.service.client
Class DefaultServiceLocatorFactory

java.lang.Object
  extended by org.openvpms.esci.service.client.DefaultServiceLocatorFactory
All Implemented Interfaces:
ServiceLocatorFactory

public class DefaultServiceLocatorFactory
extends Object
implements ServiceLocatorFactory

Default implementation of the ServiceLocatorFactory interface.

This caches locators.

Version:
$LastChangedDate: 2006-05-02 05:16:31Z $
Author:
OpenVPMS Team

Constructor Summary
DefaultServiceLocatorFactory()
           
 
Method Summary
<T> ServiceLocator<T>
getServiceLocator(Class<T> serviceInterface, String wsdlDocumentURL, String username, String password)
          Returns a ServiceLocator for the specified service interface, WSDL document URL and credentials.
<T> ServiceLocator<T>
getServiceLocator(Class<T> serviceInterface, String wsdlDocumentURL, String endpointAddress, String username, String password)
          Returns a ServiceLocator for the specified service interface, WSDL document URL and credentials.
 void setServiceAuthenticators(ServiceAuthenticators authenticators)
          Sets the service authenticators.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultServiceLocatorFactory

public DefaultServiceLocatorFactory()
Method Detail

setServiceAuthenticators

public void setServiceAuthenticators(ServiceAuthenticators authenticators)
Sets the service authenticators.

This is only used when accessing WSDL that is password protected.

Parameters:
authenticators - the authenticators. May be null

getServiceLocator

public <T> ServiceLocator<T> getServiceLocator(Class<T> serviceInterface,
                                               String wsdlDocumentURL,
                                               String username,
                                               String password)
                                    throws MalformedURLException
Returns a ServiceLocator for the specified service interface, WSDL document URL and credentials.

Specified by:
getServiceLocator in interface ServiceLocatorFactory
Parameters:
serviceInterface - the service interface
wsdlDocumentURL - the WSDL document URL
username - the user name to connect with. May be null
password - the password to connect with. May be null
Returns:
a service locator
Throws:
MalformedURLException - if the WSDL document URL is invalid

getServiceLocator

public <T> ServiceLocator<T> getServiceLocator(Class<T> serviceInterface,
                                               String wsdlDocumentURL,
                                               String endpointAddress,
                                               String username,
                                               String password)
                                    throws MalformedURLException
Returns a ServiceLocator for the specified service interface, WSDL document URL and credentials.

Specified by:
getServiceLocator in interface ServiceLocatorFactory
Parameters:
serviceInterface - the service interface
wsdlDocumentURL - the WSDL document URL
endpointAddress - the endpoint address. May be null
username - the user name to connect with. May be null
password - the password to connect with. May be null
Returns:
a service locator
Throws:
MalformedURLException - if the WSDL document URL is invalid


Copyright © 2010-2011 OpenVPMS. All Rights Reserved..