Class ValidatingResponseHandler<T>

java.lang.Object
com.github.sardine.impl.handler.ValidatingResponseHandler<T>
Type Parameters:
T - return type of ResponseHandler.handleResponse(HttpResponse).
All Implemented Interfaces:
org.apache.http.client.ResponseHandler<T>
Direct Known Subclasses:
ETagResponseHandler, ExistsResponseHandler, HeadersResponseHandler, LockResponseHandler, MultiStatusResponseHandler, VoidResponseHandler

public abstract class ValidatingResponseHandler<T> extends Object implements org.apache.http.client.ResponseHandler<T>
Basic response handler which takes an url for documentation.
  • Constructor Details

    • ValidatingResponseHandler

      public ValidatingResponseHandler()
  • Method Details

    • validateResponse

      protected void validateResponse(org.apache.http.HttpResponse response) throws SardineException
      Checks the response for a statuscode between HttpStatus.SC_OK and HttpStatus.SC_MULTIPLE_CHOICES and throws an SardineException otherwise.
      Parameters:
      response - to check
      Throws:
      SardineException - when the status code is not acceptable.