com.android.volley
クラス DefaultRetryPolicy

java.lang.Object
  上位を拡張 com.android.volley.DefaultRetryPolicy
すべての実装されたインタフェース:
RetryPolicy

public class DefaultRetryPolicy
extends java.lang.Object
implements RetryPolicy

Default retry policy for requests.


フィールドの概要
static float DEFAULT_BACKOFF_MULT
          The default backoff multiplier
static int DEFAULT_MAX_RETRIES
          The default number of retries
static int DEFAULT_TIMEOUT_MS
          The default socket timeout in milliseconds
 
コンストラクタの概要
DefaultRetryPolicy()
          Constructs a new retry policy using the default timeouts.
DefaultRetryPolicy(int initialTimeoutMs, int maxNumRetries, float backoffMultiplier)
          Constructs a new retry policy.
 
メソッドの概要
 int getCurrentRetryCount()
          Returns the current retry count.
 int getCurrentTimeout()
          Returns the current timeout.
 void retry(VolleyError error)
          Prepares for the next retry by applying a backoff to the timeout.
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

DEFAULT_TIMEOUT_MS

public static final int DEFAULT_TIMEOUT_MS
The default socket timeout in milliseconds

関連項目:
定数フィールド値

DEFAULT_MAX_RETRIES

public static final int DEFAULT_MAX_RETRIES
The default number of retries

関連項目:
定数フィールド値

DEFAULT_BACKOFF_MULT

public static final float DEFAULT_BACKOFF_MULT
The default backoff multiplier

関連項目:
定数フィールド値
コンストラクタの詳細

DefaultRetryPolicy

public DefaultRetryPolicy()
Constructs a new retry policy using the default timeouts.


DefaultRetryPolicy

public DefaultRetryPolicy(int initialTimeoutMs,
                          int maxNumRetries,
                          float backoffMultiplier)
Constructs a new retry policy.

パラメータ:
initialTimeoutMs - The initial timeout for the policy.
maxNumRetries - The maximum number of retries.
backoffMultiplier - Backoff multiplier for the policy.
メソッドの詳細

getCurrentTimeout

public int getCurrentTimeout()
Returns the current timeout.

定義:
インタフェース RetryPolicy 内の getCurrentTimeout

getCurrentRetryCount

public int getCurrentRetryCount()
Returns the current retry count.

定義:
インタフェース RetryPolicy 内の getCurrentRetryCount

retry

public void retry(VolleyError error)
           throws VolleyError
Prepares for the next retry by applying a backoff to the timeout.

定義:
インタフェース RetryPolicy 内の retry
パラメータ:
error - The error code of the last attempt.
例外:
VolleyError - In the event that the retry could not be performed (for example if we ran out of attempts), the passed in error is thrown.