Package com.github.sardine.impl.handler
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.
- Author:
- mirko
-
Constructor Summary
Constructors Constructor Description ValidatingResponseHandler() -
Method Summary
Modifier and Type Method Description protected voidvalidateResponse(org.apache.http.HttpResponse response)Checks the response for a statuscode betweenHttpStatus.SC_OKandHttpStatus.SC_MULTIPLE_CHOICESand throws anSardineExceptionotherwise.
-
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.
-