Android APIs
public class

DefaultHttpRequestRetryHandler

extends Object
implements HttpRequestRetryHandler
java.lang.Object
   ↳ org.apache.http.impl.client.DefaultHttpRequestRetryHandler

Class Overview

The default HttpRequestRetryHandler used by request executors.

Summary

Public Constructors
DefaultHttpRequestRetryHandler(int retryCount, boolean requestSentRetryEnabled)
Default constructor
DefaultHttpRequestRetryHandler()
Default constructor
Public Methods
int getRetryCount()
boolean isRequestSentRetryEnabled()
boolean retryRequest(IOException exception, int executionCount, HttpContext context)
Used retryCount and requestSentRetryEnabled to determine if the given method should be retried.
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.apache.http.client.HttpRequestRetryHandler

Public Constructors

public DefaultHttpRequestRetryHandler (int retryCount, boolean requestSentRetryEnabled)

Added in API level 1

Default constructor

public DefaultHttpRequestRetryHandler ()

Added in API level 1

Default constructor

Public Methods

public int getRetryCount ()

Added in API level 1

Returns
  • the maximum number of times a method will be retried

public boolean isRequestSentRetryEnabled ()

Added in API level 1

Returns
  • true if this handler will retry methods that have successfully sent their request, false otherwise

public boolean retryRequest (IOException exception, int executionCount, HttpContext context)

Added in API level 1

Used retryCount and requestSentRetryEnabled to determine if the given method should be retried.

Parameters
exception the exception that occurred
executionCount the number of times this method has been unsuccessfully executed
context the context for the request execution
Returns
  • true if the method should be retried, false otherwise