org.qi4j.library.rest.client.api
Class ErrorHandler
java.lang.Object
org.qi4j.library.rest.client.api.ErrorHandler
- All Implemented Interfaces:
- ResponseHandler
public class ErrorHandler
- extends java.lang.Object
- implements ResponseHandler
Implements a chained list of specification->handler. Add the most specific handlers first, and the most generic last.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AUTHENTICATION_REQUIRED
public static Specification<org.restlet.Response> AUTHENTICATION_REQUIRED
RECOVERABLE_ERROR
public static Specification<org.restlet.Response> RECOVERABLE_ERROR
ErrorHandler
public ErrorHandler()
onError
public ErrorHandler onError(Specification<org.restlet.Response> responseSpecification,
ResponseHandler handler)
onError
public ErrorHandler onError(ResponseHandler handler)
handleResponse
public HandlerCommand handleResponse(org.restlet.Response response,
ContextResourceClient client)
- Specified by:
handleResponse
in interface ResponseHandler