org.alfresco.http
Class SimpleHttpRequestCallback
java.lang.Object
org.alfresco.http.AbstractHttpRequestCallback<org.apache.http.HttpResponse>
org.alfresco.http.SimpleHttpRequestCallback
- All Implemented Interfaces:
- HttpRequestCallback<org.apache.http.HttpResponse>
public class SimpleHttpRequestCallback
- extends AbstractHttpRequestCallback<org.apache.http.HttpResponse>
Response callback that returns the HttpResponse on success
and throws runtime exceptions on errors.
- Since:
- 1.2
- Author:
- Derek Hulley
|
Method Summary |
static HttpRequestCallback<org.apache.http.HttpResponse> |
getInstance()
Get a singleton instance of this class |
org.apache.http.HttpResponse |
onCallSuccess(org.apache.http.HttpResponse response)
Returns the response without any modifications |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleHttpRequestCallback
public SimpleHttpRequestCallback()
getInstance
public static HttpRequestCallback<org.apache.http.HttpResponse> getInstance()
- Get a singleton instance of this class
- Returns:
- Returns the singleton instance that can be used for direct response handling
onCallSuccess
public org.apache.http.HttpResponse onCallSuccess(org.apache.http.HttpResponse response)
- Returns the response without any modifications
- Returns:
- any result extracted from the response body.
Copyright © 2012. All Rights Reserved.