|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.microsoft.tfs.core.config.DefaultConnectionAdvisor
public class DefaultConnectionAdvisor
The default ConnectionAdvisor implementation.
Non-trivial client applications will almost certainly want to extend this
class, if only to override
#getBasePersistenceStore(ConnectionInstanceData) so cache data goes
into a custom location (perhaps named for the vendor).
| Constructor Summary | |
|---|---|
DefaultConnectionAdvisor(java.util.Locale locale,
java.util.TimeZone timeZone)
Creates a DefaultConnectionAdvisor that will return the specified
Locale and TimeZone for all
ConnectionInstanceDatas. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultConnectionAdvisor(java.util.Locale locale,
java.util.TimeZone timeZone)
DefaultConnectionAdvisor that will return the specified
Locale and TimeZone for all
ConnectionInstanceDatas.
locale - the locale (must not be null)timeZone - the time zone (must not be null)| Method Detail |
|---|
public java.util.Locale getLocale(ConnectionInstanceData instanceData)
ConnectionAdvisor
Called by the TFSConnection the first time that the
TFSConnection's Locale is requested.
This value will be sent to the server with web service requests to identify the client's preferred language and country (via the HTTP Accept-Language header). It is also used by core classes to compare strings, format output, etc., in the correct way for the current connection.
getLocale in interface ConnectionAdvisorinstanceData - the TFSConnection's instance data
Locale for the TFSConnection to use, never
nullpublic java.util.TimeZone getTimeZone(ConnectionInstanceData instanceData)
ConnectionAdvisorTFSConnection the first time that the
TFSConnection's TimeZone is requested.
getTimeZone in interface ConnectionAdvisorinstanceData - the TFSConnection's instance data
TimeZone for the TFSConnection to use, never
nullpublic PersistenceStoreProvider getPersistenceStoreProvider(ConnectionInstanceData instanceData)
ConnectionAdvisorTFSConnection the first time that the
TFSConnection's PersistenceStoreProvider is requested.
getPersistenceStoreProvider in interface ConnectionAdvisorinstanceData - the TFSConnection's instance data
PersistenceStoreProvider for the TFSConnection
to use, never nullpublic ClientFactory getClientFactory(ConnectionInstanceData instanceData)
ConnectionAdvisorTFSConnection the first time that a client is
requested.
getClientFactory in interface ConnectionAdvisorinstanceData - the TFSConnection's instance data
ClientFactory for the TFSConnection to use
(must not be null)public HTTPClientFactory getHTTPClientFactory(ConnectionInstanceData instanceData)
ConnectionAdvisorTFSConnection the first time that the
TFSConnection's HttpClient is requested.
getHTTPClientFactory in interface ConnectionAdvisorinstanceData - the TFSConnection's instance data
HTTPClientFactory for the TFSConnection to use
(must not be null)public ServerURIProvider getServerURIProvider(ConnectionInstanceData instanceData)
ConnectionAdvisorTFSConnection the first time that the
TFSConnection's server URI is requested.
getServerURIProvider in interface ConnectionAdvisorinstanceData - the TFSConnection's instance data
ServerURIProvider for the TFSConnection to use
(must not be null)public TFProxyServerSettingsFactory getTFProxyServerSettingsFactory(ConnectionInstanceData instanceData)
ConnectionAdvisorTFSConnection the first time that the
TFSConnection's TFProxyServerSettings is requested.
getTFProxyServerSettingsFactory in interface ConnectionAdvisorinstanceData - the TFSConnection's instance data (never null
)
TFProxyServerSettings object for the
TFSConnection to use, or null to not use a
TFS proxy serverpublic WebServiceFactory getWebServiceFactory(ConnectionInstanceData instanceData)
TFSConnection the first time that a web service is
requested.
Returns a DefaultWebServiceFactory that uses the Locale
returned by getLocale(ConnectionInstanceData) and a
DefaultTransportRequestHandler, which can only fetch OAuth WRAP
credentials for the TFSConnection in use. Derived classes that
want different federated authentication behavior, but keep the other
DefaultWebServiceFactory behavior, can return a
DefaultWebServiceFactory created with a different
TransportRequestHandler.
getWebServiceFactory in interface ConnectionAdvisorinstanceData - the TFSConnection's instance data
WebServiceFactory for the TFSConnection to use
(must not be null)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||