com.microsoft.tfs.core.httpclient
Class ActiveHttpMethods
java.lang.Object
com.microsoft.tfs.core.httpclient.ActiveHttpMethods
public abstract class ActiveHttpMethods
- extends java.lang.Object
Tracks which HttpConnections
s are currently being used inside which
monitor objects (for example, a com.microsoft.tfs.util.tasks.TaskMonitor) to
facilitate cancellation by some other thread.
Normal usage is like:
- Application code begins a command, calls
setMonitor(Object)
- HttpClient calls
setMethod(HttpMethod)
before executing some
HttpMethod
- The method finishes, HttpClient calls
clearMethod()
- Possibly more methods execute repeating steps 2 and 3
- Application code finishes the command, calls
clearMonitor()
The following access rules must be followed:
This class is optional for applications, they are not required register
monitors at all, but cancellation might not be available if they don't.
- Thread-safety:
- thread-safe
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ActiveHttpMethods
public ActiveHttpMethods()
setMonitor
public static void setMonitor(java.lang.Object mon)
clearMonitor
public static void clearMonitor()
setMethod
public static void setMethod(HttpMethod method)
clearMethod
public static void clearMethod()
getMonitorMethods
public static java.util.Map<java.lang.Object,HttpMethod> getMonitorMethods()
- Returns:
- a copy of the monitor to
HttpMethod
map
© 2015 Microsoft. All rights reserved.