Methods Summary |
---|
public synchronized boolean | cancel(boolean mayInterruptIfRunning)
if (mRequest == null) {
return false;
}
if (!isDone()) {
mRequest.cancel();
return true;
} else {
return false;
}
|
private synchronized T | doGet(java.lang.Long timeoutMs)
if (mException != null) {
throw new ExecutionException(mException);
}
if (mResultReceived) {
return mResult;
}
if (timeoutMs == null) {
wait(0);
} else if (timeoutMs > 0) {
wait(timeoutMs);
}
if (mException != null) {
throw new ExecutionException(mException);
}
if (!mResultReceived) {
throw new TimeoutException();
}
return mResult;
|
public T | get()
try {
return doGet(null);
} catch (TimeoutException e) {
throw new AssertionError(e);
}
|
public T | get(long timeout, java.util.concurrent.TimeUnit unit)
return doGet(TimeUnit.MILLISECONDS.convert(timeout, unit));
|
public boolean | isCancelled()
if (mRequest == null) {
return false;
}
return mRequest.isCanceled();
|
public synchronized boolean | isDone()
return mResultReceived || mException != null || isCancelled();
|
public static com.android.volley.toolbox.RequestFuture | newFuture()
return new RequestFuture<E>();
|
public synchronized void | onErrorResponse(com.android.volley.VolleyError error)
mException = error;
notifyAll();
|
public synchronized void | onResponse(T response)
mResultReceived = true;
mResult = response;
notifyAll();
|
public void | setRequest(com.android.volley.Request request)
mRequest = request;
|