public abstract class RetryOn extends Object
Subclasses should override either the onCode(int)
method (if you only care about the HTTP status code)
or onResponse(HttpResponse)
(if you want full access to the HTTP response object.
Modifier and Type | Field and Description |
---|---|
static RetryOn |
CONNECTION_LOST
Default RetryOn that returns
|
static RetryOn |
DEFAULT
Default RetryOn that returns
|
Constructor and Description |
---|
RetryOn() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
onCode(int httpResponseCode)
Subclasses should override this method to determine whether the HTTP response is retryable.
|
protected boolean |
onResponse(org.apache.http.HttpResponse response)
Subclasses should override this method to determine whether the HTTP response is retryable.
|
public static final RetryOn DEFAULT
public static final RetryOn CONNECTION_LOST
public RetryOn()
protected boolean onResponse(org.apache.http.HttpResponse response)
response
- The HTTP response object. May be protected boolean onCode(int httpResponseCode)
httpResponseCode
- The HTTP response code. Copyright © 2016–2019 The Apache Software Foundation. All rights reserved.