org.alfresco.http
Class AbstractHttpRequestCallback<T>
java.lang.Object
org.alfresco.http.AbstractHttpRequestCallback<T>
- All Implemented Interfaces:
- HttpRequestCallback<T>
- Direct Known Subclasses:
- JSONArrayCallback, JSONObjectCallback, SimpleHttpRequestCallback
public abstract class AbstractHttpRequestCallback<T>
- extends Object
- implements HttpRequestCallback<T>
Response callback that returns the HttpResponse on success
and throws runtime exceptions on errors.
- Since:
- 1.2
- Author:
- Derek Hulley
|
Method Summary |
T |
onCallException(org.apache.http.HttpResponse response,
Throwable t)
Called when an error occurs when sending the request. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractHttpRequestCallback
public AbstractHttpRequestCallback()
onCallException
public T onCallException(org.apache.http.HttpResponse response,
Throwable t)
- Description copied from interface:
HttpRequestCallback
- Called when an error occurs when sending the request. Implementations can choose
to propogate the error, generate a new one or process the and return a result.
- Specified by:
onCallException in interface HttpRequestCallback<T>
t - optional exception that caused the error
- Returns:
- any result extracted from the response or error
- Throws:
RuntimeException - error is wrapped and thrown
Copyright © 2012. All Rights Reserved.