Package com.google.api.client.http

Examples of com.google.api.client.http.HttpBackOffUnsuccessfulResponseHandler


  static class ZeroBackOffRequestInitializer implements HttpRequestInitializer {
    public void initialize(HttpRequest request) {
      request.setIOExceptionHandler(new HttpBackOffIOExceptionHandler(BackOff.ZERO_BACKOFF));
      request.setUnsuccessfulResponseHandler(
          new HttpBackOffUnsuccessfulResponseHandler(BackOff.ZERO_BACKOFF));
    }
View Full Code Here


    request.setParser(new JsonObjectParser(jsonFactory));

    final ExponentialBackOff backoff = new ExponentialBackOff.Builder().setInitialIntervalMillis(500)
        .setMaxElapsedTimeMillis(60000).setMaxIntervalMillis(30000).setMultiplier(1.5)
        .setRandomizationFactor(0.5).build();
    request.setUnsuccessfulResponseHandler(new HttpBackOffUnsuccessfulResponseHandler(backoff));
  }
View Full Code Here

TOP

Related Classes of com.google.api.client.http.HttpBackOffUnsuccessfulResponseHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.