Package org.apache.http.impl.client
Class NullBackoffStrategy
java.lang.Object
org.apache.http.impl.client.NullBackoffStrategy
- All Implemented Interfaces:
ConnectionBackoffStrategy
This is a
ConnectionBackoffStrategy
that never backs off,
for compatibility with existing behavior.- Since:
- 4.2
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Determines whether seeing the givenThrowable
as a result of request execution should result in a backoff signal.boolean
shouldBackoff
(org.apache.http.HttpResponse resp) Determines whether receiving the givenHttpResponse
as a result of request execution should result in a backoff signal.
-
Constructor Details
-
NullBackoffStrategy
public NullBackoffStrategy()
-
-
Method Details
-
shouldBackoff
Description copied from interface:ConnectionBackoffStrategy
Determines whether seeing the givenThrowable
as a result of request execution should result in a backoff signal.- Specified by:
shouldBackoff
in interfaceConnectionBackoffStrategy
- Parameters:
t
- theThrowable
that happened- Returns:
true
if a backoff signal should be given
-
shouldBackoff
public boolean shouldBackoff(org.apache.http.HttpResponse resp) Description copied from interface:ConnectionBackoffStrategy
Determines whether receiving the givenHttpResponse
as a result of request execution should result in a backoff signal. Implementations MUST restrict themselves to examining the response header and MUST NOT consume any of the response body, if any.- Specified by:
shouldBackoff
in interfaceConnectionBackoffStrategy
- Parameters:
resp
- theHttpResponse
that was received- Returns:
true
if a backoff signal should be given
-