org.alfresco.json
Class JSONArrayCallback

java.lang.Object
  extended by org.alfresco.http.AbstractHttpRequestCallback<org.json.simple.JSONArray>
      extended by org.alfresco.json.JSONArrayCallback
All Implemented Interfaces:
HttpRequestCallback<org.json.simple.JSONArray>

public class JSONArrayCallback
extends AbstractHttpRequestCallback<org.json.simple.JSONArray>

A HttpRequestCallback that parses the response body as a JSONArrayin the 'data' property (RestConstants#JSON_DATA) of the JSON body.
An exception is thrown when JSON could not be extracted.

Author:
Frederik Heremans

Constructor Summary
JSONArrayCallback()
           
 
Method Summary
 org.json.simple.JSONArray onCallSuccess(org.apache.http.HttpResponse method)
          Called when call was successful.
 
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

JSONArrayCallback

public JSONArrayCallback()
Method Detail

onCallSuccess

public org.json.simple.JSONArray onCallSuccess(org.apache.http.HttpResponse method)
Description copied from interface: HttpRequestCallback
Called when call was successful.

Returns:
any result extracted from the response body.


Copyright © 2012. All Rights Reserved.