Class ValidatingResponseHandler<T>
java.lang.Object
com.github.sardine.impl.handler.ValidatingResponseHandler<T>
- Type Parameters:
T- return type ofResponseHandler.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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidvalidateResponse(org.apache.http.HttpResponse response) Checks the response for a statuscode betweenHttpStatus.SC_OKandHttpStatus.SC_MULTIPLE_CHOICESand throws anSardineExceptionotherwise.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.http.client.ResponseHandler
handleResponse
-
Constructor Details
-
ValidatingResponseHandler
public ValidatingResponseHandler()
-
-
Method Details
-
validateResponse
Checks the response for a statuscode betweenHttpStatus.SC_OKandHttpStatus.SC_MULTIPLE_CHOICESand throws anSardineExceptionotherwise.- Parameters:
response- to check- Throws:
SardineException- when the status code is not acceptable.
-