|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TFProxyServerSettings
TFProxyServerSettings
is an interface that makes Team Foundation
Proxy (aka download proxy) settings available. A
TFProxyServerSettings
instance is available from a
TFSTeamProjectCollection
.
Client notes: The return values from the isAvailable()
and
getURL()
methods could change at any time. Clients must not assume
that these values will not change. Clients should not cache these values
longer than the duration of a single download. Clients should follow this
pattern at the beginning of each download:
isAvailable()
- if the result is false
, do not
use a TF proxy for that download.isAvailable()
is true
, call getURL()
.
If the result is null
, do not use a TF proxy for that download.null
, attempt to use that url as a proxy
url to perform the download.recordFailure()
so that the TFProxyServerSettings
implementation can enforce a
failure policy.
Implementation notes: TFProxyServerSettings
implementations must be
thread safe as they will be accessed from multiple threads, possibly
simultaneously. Implementations are responsible for enforcing a failure
policy. Implementations are notified of proxy failures through the
recordFailure()
method. A reasonable failure policy is to make the
proxy unavailable for a short period of time (e.g. 5 minutes) in response to
a failure.
TFSTeamProjectCollection
Method Summary | |
---|---|
java.lang.String |
getURL()
Called second by clients to determine a TF proxy server URL to use. |
boolean |
isAvailable()
Called first by clients to determine whether this TFProxyServerSettings represents a TF proxy server that is
available to be used. |
void |
recordFailure()
Clients must call this method if a download fails because of a TF proxy server. |
Method Detail |
---|
boolean isAvailable()
TFProxyServerSettings
represents a TF proxy server that is
available to be used. As noted above, the result of this method can
change at any time.
true
if there is a TF proxy server available to be
used at the time of this method calljava.lang.String getURL()
isAvailable()
returns true
, clients
must still be prepared for a null
return value from this
method, which indicates that the TF proxy server became unavailable in
between method calls. A non-null
return can be used for a
single download as a TF proxy URL.
null
void recordFailure()
TFProxyServerSettings
a chance
to enforce a failure policy. See the javadoc for this class for the
algorithm that clients should follow when using a
TFProxyServerSettings
instance.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |