|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ConfigurableHTTPClientFactory
Adds methods to HTTPClientFactory to allow granular configuration of
properties on existing HttpClient instances.
| Method Summary | |
|---|---|
void |
configureClient(HttpClient httpClient,
ConnectionInstanceData connectionInstanceData)
Called from HTTPClientFactory.newHTTPClient() to perform final configuration of a
new HttpClient instance before it is returned to the caller of
that method. |
void |
configureClientCredentials(HttpClient httpClient,
HttpState state,
ConnectionInstanceData connectionInstanceData)
Called from HTTPClientFactory.newHTTPClient() to configure credentials for a new
HttpClient instance. |
void |
configureClientParams(HttpClient httpClient,
HttpClientParams params,
ConnectionInstanceData connectionInstanceData)
Called from HTTPClientFactory.newHTTPClient() to configure a new
HttpClient's HttpClientParams. |
void |
configureClientProxy(HttpClient httpClient,
HostConfiguration hostConfiguration,
HttpState httpState,
ConnectionInstanceData connectionInstanceData)
Called from HTTPClientFactory.newHTTPClient() to configure proxy settings for a
new HttpClient instance. |
HttpConnectionManager |
createConnectionManager(ConnectionInstanceData connectionInstanceData)
Called from HTTPClientFactory.newHTTPClient() to create and configure a new
HttpConnectionManager as part of creating a new
HttpClient instance. |
HttpClient |
createHTTPClient(HttpConnectionManager connectionManager,
ConnectionInstanceData connectionInstanceData)
Called from HTTPClientFactory.newHTTPClient() to create a new HttpClient. |
java.lang.String |
getUserAgent(HttpClient httpClient,
ConnectionInstanceData connectionInstanceData)
Called from configureClientParams(HttpClient, HttpClientParams, ConnectionInstanceData)
to obtain a user-agent string to configure a new HttpClient with. |
| Methods inherited from interface com.microsoft.tfs.core.config.httpclient.HTTPClientFactory |
|---|
dispose, newHTTPClient |
| Method Detail |
|---|
HttpConnectionManager createConnectionManager(ConnectionInstanceData connectionInstanceData)
HTTPClientFactory.newHTTPClient() to create and configure a new
HttpConnectionManager as part of creating a new
HttpClient instance. Subclasses may override. The default
behavior is to instantiate a MultiThreadedHttpConnectionManager
and configure it with some default parameters.
HttpConnectionManager (must not be
null)
HttpClient createHTTPClient(HttpConnectionManager connectionManager,
ConnectionInstanceData connectionInstanceData)
HTTPClientFactory.newHTTPClient() to create a new HttpClient.
Most of the configuration should be done by other methods - see the
javadoc on those methods for details. This method is called after
createConnectionManager(ConnectionInstanceData) and is passed
the HttpConnectionManager returned from that method. Subclasses
may override.
connectionManager - the HttpConnectionManager returned from
createConnectionManager(ConnectionInstanceData) (never
null )connectionInstanceData - the ConnectionInstanceData being used to supply
configuration data (never null)
HttpClient instance (must not be null)
void configureClientParams(HttpClient httpClient,
HttpClientParams params,
ConnectionInstanceData connectionInstanceData)
HTTPClientFactory.newHTTPClient() to configure a new
HttpClient's HttpClientParams. Subclasses may override.
The default behavior is to configure the
http.protocol.expect-continue parameter to
false and set a custom user agent string.
httpClient - the HttpClient being configured (never null)params - the HttpClientParams to configure (never null
)connectionInstanceData - the ConnectionInstanceData being used to supply
configuration data (never null)
java.lang.String getUserAgent(HttpClient httpClient,
ConnectionInstanceData connectionInstanceData)
configureClientParams(HttpClient, HttpClientParams, ConnectionInstanceData)
to obtain a user-agent string to configure a new HttpClient with.
httpClient - the HttpClient being configured (never null)connectionInstanceData - the ConnectionInstanceData being used to supply
configuration data (never null)
null to not
configure a user-agent
void configureClientCredentials(HttpClient httpClient,
HttpState state,
ConnectionInstanceData connectionInstanceData)
HTTPClientFactory.newHTTPClient() to configure credentials for a new
HttpClient instance. Subclasses may override. The default
behavior is to call #createCredentials(ConnectionInstanceData).
If that method returns a non-null Credentials
object, then that object is set as the credentials for the
HttpState.
httpClient - the HttpClient being configured (never null)state - the HttpState to configure credentials on (never
null)connectionInstanceData - the ConnectionInstanceData being used to supply
configuration data (never null)
void configureClientProxy(HttpClient httpClient,
HostConfiguration hostConfiguration,
HttpState httpState,
ConnectionInstanceData connectionInstanceData)
HTTPClientFactory.newHTTPClient() to configure proxy settings for a
new HttpClient instance. Subclasses may override.
httpClient - the HttpClient being configured (never null)hostConfiguration - the HostConfiguration of the new HttpClient
instance (never null)httpState - the HttpState of the new HttpClient instance
(never null)connectionInstanceData - the ConnectionInstanceData being used to supply
configuration data (never null)
void configureClient(HttpClient httpClient,
ConnectionInstanceData connectionInstanceData)
HTTPClientFactory.newHTTPClient() to perform final configuration of a
new HttpClient instance before it is returned to the caller of
that method. Subclasses may override. The default behavior is to call
#addClientToCloserThread(HttpClient) with the new client
instance.
httpClient - the new HttpClient instance (never null)connectionInstanceData - the ConnectionInstanceData being used to supply
configuration data (never null)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||