Class HttpBackOffUnsuccessfulResponseHandler

java.lang.Object
com.google.api.client.http.HttpBackOffUnsuccessfulResponseHandler
All Implemented Interfaces:
HttpUnsuccessfulResponseHandler

@Beta public class HttpBackOffUnsuccessfulResponseHandler extends Object implements HttpUnsuccessfulResponseHandler
Beta
Back-off handler which handles an abnormal HTTP response with BackOff.

It is designed to work with only one HttpRequest at a time. As a result you MUST create a new instance of HttpBackOffUnsuccessfulResponseHandler with a new instance of BackOff for each instance of HttpRequest.

Sample usage:

  request.setUnsuccessfulResponseHandler(
    new HttpBackOffUnsuccessfulResponseHandler(new ExponentialBackOff()));
 

Note: Implementation doesn't call BackOff.reset() at all, since it expects a new BackOff instance.

Implementation is not thread-safe

Since:
1.15