E - the BoxObject result of the requestpublic class BoxFutureTask<E extends BoxObject> extends java.util.concurrent.FutureTask<BoxResponse<E>>
BoxRequest.toTask()| Modifier and Type | Class and Description |
|---|---|
static interface |
BoxFutureTask.OnCompletedListener<E extends BoxObject> |
| Modifier and Type | Field and Description |
|---|---|
protected java.util.ArrayList<BoxFutureTask.OnCompletedListener<E>> |
mCompletedListeners |
protected BoxRequest |
mRequest |
| Modifier | Constructor and Description |
|---|---|
protected |
BoxFutureTask(java.util.concurrent.Callable<BoxResponse<E>> callable,
BoxRequest request)
Protected constructor for BoxFutureTask so that child classes can provide their own callable
implementation
|
|
BoxFutureTask(java.lang.Class<E> clazz,
BoxRequest request)
Creates an instance of a task that can be executed asynchronously
|
| Modifier and Type | Method and Description |
|---|---|
BoxFutureTask<E> |
addOnCompletedListener(BoxFutureTask.OnCompletedListener<E> listener) |
protected void |
done() |
protected final BoxRequest mRequest
protected java.util.ArrayList<BoxFutureTask.OnCompletedListener<E extends BoxObject>> mCompletedListeners
public BoxFutureTask(java.lang.Class<E> clazz, BoxRequest request)
clazz - the class of the return typerequest - the original request that was used to create the future taskprotected BoxFutureTask(java.util.concurrent.Callable<BoxResponse<E>> callable, BoxRequest request)
callable - what will be executed when the future task is runrequest - the original request that the future task was created fromprotected void done()
done in class java.util.concurrent.FutureTask<BoxResponse<E extends BoxObject>>public BoxFutureTask<E> addOnCompletedListener(BoxFutureTask.OnCompletedListener<E> listener)