|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Objectcom.android.volley.toolbox.RequestFuture<T>
T
- The type of parsed response this future expects.public class RequestFuture<T>
A Future that represents a Volley request. Used by providing as your response and error listeners. For example:
RequestFuture<JSONObject> future = RequestFuture.newFuture(); MyRequest request = new MyRequest(URL, future, future); // If you want to be able to cancel the request: future.setRequest(requestQueue.add(request)); // Otherwise: requestQueue.add(request); try { JSONObject response = future.get(); // do something with response } catch (InterruptedException e) { // handle the error } catch (ExecutionException e) { // handle the error }
メソッドの概要 | ||
---|---|---|
boolean |
cancel(boolean mayInterruptIfRunning)
|
|
T |
get()
|
|
T |
get(long timeout,
java.util.concurrent.TimeUnit unit)
|
|
boolean |
isCancelled()
|
|
boolean |
isDone()
|
|
static
|
newFuture()
|
|
void |
onErrorResponse(VolleyError error)
Callback method that an error has been occurred with the provided error code and optional user-readable message. |
|
void |
onResponse(T response)
Called when a response is received. |
|
void |
setRequest(Request<?> request)
|
クラス java.lang.Object から継承されたメソッド |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
メソッドの詳細 |
---|
public static <E> RequestFuture<E> newFuture()
public void setRequest(Request<?> request)
public boolean cancel(boolean mayInterruptIfRunning)
java.util.concurrent.Future<T>
内の cancel
public T get() throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
java.util.concurrent.Future<T>
内の get
java.lang.InterruptedException
java.util.concurrent.ExecutionException
public T get(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException, java.util.concurrent.TimeoutException
java.util.concurrent.Future<T>
内の get
java.lang.InterruptedException
java.util.concurrent.ExecutionException
java.util.concurrent.TimeoutException
public boolean isCancelled()
java.util.concurrent.Future<T>
内の isCancelled
public boolean isDone()
java.util.concurrent.Future<T>
内の isDone
public void onResponse(T response)
Response.Listener
の記述:
Response.Listener<T>
内の onResponse
public void onErrorResponse(VolleyError error)
Response.ErrorListener
の記述:
Response.ErrorListener
内の onErrorResponse
|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |