Interface HttpBackOffUnsuccessfulResponseHandler.BackOffRequired (1.43.1)

public static interface HttpBackOffUnsuccessfulResponseHandler.BackOffRequired

Beta
Interface which defines if back-off is required based on an abnormal HttpResponse.

Static Fields

ALWAYS

public static final HttpBackOffUnsuccessfulResponseHandler.BackOffRequired ALWAYS

Back-off required implementation which returns true to every #isRequired(HttpResponse) call.

Field Value
TypeDescription
HttpBackOffUnsuccessfulResponseHandler.BackOffRequired

ON_SERVER_ERROR

public static final HttpBackOffUnsuccessfulResponseHandler.BackOffRequired ON_SERVER_ERROR

Back-off required implementation which its #isRequired(HttpResponse) returns true if a server error occurred (5xx).

Field Value
TypeDescription
HttpBackOffUnsuccessfulResponseHandler.BackOffRequired

Methods

isRequired(HttpResponse response)

public abstract boolean isRequired(HttpResponse response)

Invoked when an abnormal response is received and determines if back-off is required.

Parameter
NameDescription
responseHttpResponse
Returns
TypeDescription
boolean