org.alfresco.http
Class SimpleHttpRequestCallback

java.lang.Object
  extended by org.alfresco.http.AbstractHttpRequestCallback<org.apache.http.HttpResponse>
      extended by 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

Constructor Summary
SimpleHttpRequestCallback()
           
 
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 org.alfresco.http.AbstractHttpRequestCallback
onCallException
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleHttpRequestCallback

public SimpleHttpRequestCallback()
Method Detail

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.