com.microsoft.tfs.core.config.webservice
Interface WebServiceFactory

All Known Implementing Classes:
DefaultWebServiceFactory

public interface WebServiceFactory

An WebServiceFactory is used by a TFSConnection to create web services. An WebServiceFactory is supplied to a TFSConnection by a ConnectionAdvisor.

TFSConnection allows multiple threads to use a WebServiceFactory concurrently.

For a default implementation, see DefaultWebServiceFactory.

See Also:
TFSConnection, ConnectionAdvisor, DefaultWebServiceFactory
Since:
TEE-SDK-10.1
Thread-safety:
thread-compatible

Method Summary
 java.net.URI getWebServiceURI(java.lang.Object webServiceInterfaceType)
          Called to obtain the URI that a web service previously created by this WebServiceFactory is connected to.
 ms.tfs.services.linking._03._IntegrationServiceSoap newLinkingWebService(TFSConnection connection, java.lang.String linkingEndpoint, java.net.URI connectionBaseURI, HttpClient httpClient, RegistrationClient registrationClient)
          Creates a new _IntegrationServiceSoap web service.
 ms.ws._LocationWebServiceSoap newLocationWebService(java.net.URI fullLocationServiceURI, HttpClient httpClient)
          Creates a new location web service, which cannot be created via newWebService(TFSConnection, Class, URI, HttpClient, ServerDataProvider, RegistrationClient) because that method might require a working location web service.
 ms.tfs.services.registration._03._RegistrationSoap newRegistrationWebService(java.net.URI connectionBaseURI, HttpClient httpClient)
          Creates a new registration web service, which cannot be created via newWebService(TFSConnection, Class, URI, HttpClient, ServerDataProvider, RegistrationClient) because that method requires a working registration web service.
 java.lang.Object newWebService(TFSConnection connection, java.lang.Class<?> webServiceInterfaceType, java.net.URI connectionBaseURI, HttpClient httpClient, ServerDataProvider serverDataProvider, RegistrationClient registrationClient)
          Creates a new web service implementation.
 ms.wss._ListsSoap newWSSWebService(TFSConnection connection, ProjectInfo projectInfo, java.net.URI connectionBaseURI, HttpClient httpClient, RegistrationClient registrationClient)
          Creates a new _ListsSoap web service.
 

Method Detail

newRegistrationWebService

ms.tfs.services.registration._03._RegistrationSoap newRegistrationWebService(java.net.URI connectionBaseURI,
                                                                             HttpClient httpClient)
                                                                             throws java.net.URISyntaxException
Creates a new registration web service, which cannot be created via newWebService(TFSConnection, Class, URI, HttpClient, ServerDataProvider, RegistrationClient) because that method requires a working registration web service.

Parameters:
connectionBaseURI - the connection's base URI (must not be null)
httpClient - the HttpClient to use for accessing the web service (must not be null)
Returns:
a _RegistrationSoap (never null)
Throws:
java.net.URISyntaxException

newLocationWebService

ms.ws._LocationWebServiceSoap newLocationWebService(java.net.URI fullLocationServiceURI,
                                                    HttpClient httpClient)
                                                    throws java.net.URISyntaxException
Creates a new location web service, which cannot be created via newWebService(TFSConnection, Class, URI, HttpClient, ServerDataProvider, RegistrationClient) because that method might require a working location web service.

Parameters:
fullLocationServiceURI - the full URI to the location service (must not be null)
httpClient - the HttpClient to use for accessing the web service (must not be null)
Returns:
a _LocationWebServiceSoap (never null)
Throws:
java.net.URISyntaxException

newWebService

java.lang.Object newWebService(TFSConnection connection,
                               java.lang.Class<?> webServiceInterfaceType,
                               java.net.URI connectionBaseURI,
                               HttpClient httpClient,
                               ServerDataProvider serverDataProvider,
                               RegistrationClient registrationClient)
                               throws java.net.URISyntaxException,
                                      UnknownWebServiceException
Creates a new web service implementation.

Parameters:
webServiceInterfaceType - the web service interface type (for example, _CatalogWebServiceSoap; not an implementation like _CatalogWebServiceSoap12Service) (must not be null)
connectionBaseURI - the connection's base URI (must not be null)
httpClient - the HttpClient to use for accessing the web service (must not be null)
serverDataProvider - the ServerDataProvider (must not be null except when webServiceInterfaceType is _LocationWebServiceSoap.class)
registrationClient - the RegistrationClient (may be null if the web service type is for a TFSConfigurationServer, which does not support the registration service)
Returns:
a web service implementation that implements the web service type specified by the type parameter or null if the web service type is known but no endpoint is appropriate for the current connection (for example, old server which doesn't support the requested service)
Throws:
UnknownWebServiceException - if the specified web service type is unknown
java.net.URISyntaxException

newWSSWebService

ms.wss._ListsSoap newWSSWebService(TFSConnection connection,
                                   ProjectInfo projectInfo,
                                   java.net.URI connectionBaseURI,
                                   HttpClient httpClient,
                                   RegistrationClient registrationClient)
                                   throws java.net.URISyntaxException
Creates a new _ListsSoap web service.

Parameters:
connection - the TFSConnection
projectInfo - the team project to create the web service for (must not be null)
connectionBaseURI - the connection's base URI (must not be null)
httpClient - the HttpClient to use for accessing the web service (must not be null)
registrationClient - the RegistrationClient (must not be null)
Returns:
a _ListsSoap web service implementation (never null)
Throws:
java.net.URISyntaxException

newLinkingWebService

ms.tfs.services.linking._03._IntegrationServiceSoap newLinkingWebService(TFSConnection connection,
                                                                         java.lang.String linkingEndpoint,
                                                                         java.net.URI connectionBaseURI,
                                                                         HttpClient httpClient,
                                                                         RegistrationClient registrationClient)
                                                                         throws java.net.URISyntaxException
Creates a new _IntegrationServiceSoap web service.

Parameters:
connection - the TFSConnection
linkingEndpoint - the endpoint the linking web service should use
connectionBaseURI - the connection's base URI (must not be null)
httpClient - the HttpClient to use for accessing the web service (must not be null)
registrationClient - the RegistrationClient (must not be null)
Returns:
a _IntegrationServiceSoap web service implementation (never null)
Throws:
java.net.URISyntaxException

getWebServiceURI

java.net.URI getWebServiceURI(java.lang.Object webServiceInterfaceType)
                              throws java.lang.IllegalArgumentException,
                                     java.lang.ClassCastException,
                                     java.net.URISyntaxException
Called to obtain the URI that a web service previously created by this WebServiceFactory is connected to.

Parameters:
webServiceInterfaceType - the web service interface type (for example, _CatalogWebServiceSoap; not an implementation like _CatalogWebServiceSoap12Service) (must not be null)
Returns:
the URI the web service is connected to (never null)
Throws:
java.lang.IllegalArgumentException - if the argument is null or is not a web service previously created by this WebServiceFactory
{@link - ClassCastException} if the argument is not a web service previously created by this WebServiceFactory
java.lang.ClassCastException
java.net.URISyntaxException


© 2015 Microsoft. All rights reserved.