public class NullBackoffStrategy extends Object implements ConnectionBackoffStrategy
ConnectionBackoffStrategy
that never backs off,
for compatibility with existing behavior.Constructor and Description |
---|
NullBackoffStrategy() |
Modifier and Type | Method and Description |
---|---|
boolean |
shouldBackoff(org.apache.http.HttpResponse resp)
Determines whether receiving the given
HttpResponse as
a result of request execution should result in a backoff
signal. |
boolean |
shouldBackoff(Throwable t)
Determines whether seeing the given
Throwable as
a result of request execution should result in a backoff
signal. |
public boolean shouldBackoff(Throwable t)
ConnectionBackoffStrategy
Throwable
as
a result of request execution should result in a backoff
signal.shouldBackoff
in interface ConnectionBackoffStrategy
t
- the Throwable
that happenedtrue
if a backoff signal should be
givenpublic boolean shouldBackoff(org.apache.http.HttpResponse resp)
ConnectionBackoffStrategy
HttpResponse
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.shouldBackoff
in interface ConnectionBackoffStrategy
resp
- the HttpResponse
that was receivedtrue
if a backoff signal should be
givenCopyright © 1999–2022 The Apache Software Foundation. All rights reserved.