SMILA 1.0 API documentation

org.eclipse.smila.http.client.impl
Class DefaultHttpResultHandler

java.lang.Object
  extended by org.eclipse.smila.http.client.impl.DefaultHttpResultHandler
All Implemented Interfaces:
HttpResultHandler

public class DefaultHttpResultHandler
extends java.lang.Object
implements HttpResultHandler

Helper class for DefaultRestClient to handle results of HTTP requests.


Constructor Summary
DefaultHttpResultHandler()
           
 
Method Summary
 BulkResponseImpl handleJsonBulkResult(java.io.InputStream content)
          Create JSON bulk result object.
 Any handleJsonResult(java.io.InputStream content)
          Read single JSON object from response stream.
 java.io.InputStream processHttpResponse(HttpUriRequest request, HttpResponse response)
          Check the HTTP response: JSON response, success status code: return content stream no or non-JSON response, success status code: consume content and return null.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultHttpResultHandler

public DefaultHttpResultHandler()
Method Detail

processHttpResponse

public java.io.InputStream processHttpResponse(HttpUriRequest request,
                                               HttpResponse response)
                                        throws java.io.IOException,
                                               RestException
Description copied from interface: HttpResultHandler
Check the HTTP response:

Specified by:
processHttpResponse in interface HttpResultHandler
Throws:
java.io.IOException
RestException

handleJsonResult

public Any handleJsonResult(java.io.InputStream content)
                     throws java.io.IOException
Description copied from interface: HttpResultHandler
Read single JSON object from response stream.

Specified by:
handleJsonResult in interface HttpResultHandler
Throws:
java.io.IOException

handleJsonBulkResult

public BulkResponseImpl handleJsonBulkResult(java.io.InputStream content)
                                      throws java.io.IOException
Description copied from interface: HttpResultHandler
Create JSON bulk result object.

Specified by:
handleJsonBulkResult in interface HttpResultHandler
Throws:
java.io.IOException

SMILA 1.0 API documentation