public class RequestHandle
extends java.lang.Object
Constructor and Description |
---|
RequestHandle(AsyncHttpRequest request) |
Modifier and Type | Method and Description |
---|---|
boolean |
cancel(boolean mayInterruptIfRunning)
Attempts to cancel this request.
|
java.lang.Object |
getTag()
Will return TAG of underlying AsyncHttpRequest if it's not already GCed
|
boolean |
isCancelled()
Returns true if this task was cancelled before it completed normally.
|
boolean |
isFinished()
Returns true if this task completed.
|
RequestHandle |
setTag(java.lang.Object tag)
Will set Object as TAG to underlying AsyncHttpRequest
|
boolean |
shouldBeGarbageCollected() |
public RequestHandle(AsyncHttpRequest request)
public boolean cancel(boolean mayInterruptIfRunning)
After this method returns, subsequent calls to isDone() will always return true. Subsequent calls to isCancelled() will always return true if this method returned true. Subsequent calls to isDone() will return true either if the request got cancelled by this method, or if the request completed normally
mayInterruptIfRunning
- true if the thread executing this request should be interrupted;
otherwise, in-progress requests are allowed to completepublic boolean isFinished()
public boolean isCancelled()
public boolean shouldBeGarbageCollected()
public java.lang.Object getTag()
public RequestHandle setTag(java.lang.Object tag)
tag
- Object used as TAG to underlying AsyncHttpRequest