com.microsoft.tfs.core.config.tfproxy
Class DefaultTFProxyServerSettingsFactory

java.lang.Object
  extended by com.microsoft.tfs.core.config.tfproxy.DefaultTFProxyServerSettingsFactory
All Implemented Interfaces:
TFProxyServerSettingsFactory

public class DefaultTFProxyServerSettingsFactory
extends java.lang.Object
implements TFProxyServerSettingsFactory

A default implementation of TFProxyServerSettingsFactory which returns a DefaultTFProxyServerSettings if a TF download proxy is configured through the EnvironmentVariables.TF_PROXY environment variable or Windows registry setting, or returns null if no proxy is configured.

Since:
TEE-SDK-10.1
Thread-safety:
immutable

Constructor Summary
DefaultTFProxyServerSettingsFactory(ConnectionInstanceData connectionInstanceData)
           
 
Method Summary
protected  TFProxyServerSettings configureFromEnvironmentVariable()
          Checks the environment for TF proxy server variable and returns a TFProxyServerSettings if one was configured.
protected  TFProxyServerSettings configureFromRegistry()
          Checks the registry for TF proxy server settings and returns a TFProxyServerSettings if one was configured.
 void dispose(TFProxyServerSettings proxyServerSettings)
           Called to dispose a TFProxyServerSettings that was previously obtained from a call to TFProxyServerSettingsFactory.newProxyServerSettings().
 TFProxyServerSettings newProxyServerSettings()
          Called to obtain TF proxy server settings.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultTFProxyServerSettingsFactory

public DefaultTFProxyServerSettingsFactory(ConnectionInstanceData connectionInstanceData)
Method Detail

newProxyServerSettings

public TFProxyServerSettings newProxyServerSettings()
Description copied from interface: TFProxyServerSettingsFactory
Called to obtain TF proxy server settings.

Specified by:
newProxyServerSettings in interface TFProxyServerSettingsFactory
Returns:
a TFProxyServerSettings instance or null if there are no TF proxy server settings

dispose

public void dispose(TFProxyServerSettings proxyServerSettings)
Description copied from interface: TFProxyServerSettingsFactory

Called to dispose a TFProxyServerSettings that was previously obtained from a call to TFProxyServerSettingsFactory.newProxyServerSettings().

This method is called by TFSConnection.close() to clean up any resources. It can be assumed that the specified TFProxyServerSettings instance will no longer be used after calling this method.

Specified by:
dispose in interface TFProxyServerSettingsFactory
Parameters:
proxyServerSettings - an TFProxyServerSettings instance to dispose (must not be null)

configureFromEnvironmentVariable

protected TFProxyServerSettings configureFromEnvironmentVariable()
Checks the environment for TF proxy server variable and returns a TFProxyServerSettings if one was configured.

Returns:
the TFProxyServerSettings created from environment variable settings, or null if none was configured

configureFromRegistry

protected TFProxyServerSettings configureFromRegistry()
Checks the registry for TF proxy server settings and returns a TFProxyServerSettings if one was configured.

Returns:
the TFProxyServerSettings created from registry settings, or null if none was configured


© 2015 Microsoft. All rights reserved.