SMILA 1.0 API documentation

org.eclipse.smila.http.client.impl.base
Interface HttpResultHandler

All Known Implementing Classes:
DefaultHttpResultHandler

public interface HttpResultHandler

Interface for objects that handle the HTTP resposonses for the RestClient. The interface has been defined to be able to modify details of the HTTP result handling of the RestClient for special use cases. Usually the default implementation provided by this bundle is completely sufficient, so a standard user does not need to care about these things.


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.
 

Method Detail

processHttpResponse

java.io.InputStream processHttpResponse(HttpUriRequest request,
                                        HttpResponse response)
                                        throws java.io.IOException,
                                               RestException
Check the HTTP response:

Throws:
java.io.IOException
RestException

handleJsonResult

Any handleJsonResult(java.io.InputStream content)
                     throws java.io.IOException
Read single JSON object from response stream.

Throws:
java.io.IOException

handleJsonBulkResult

BulkResponseImpl handleJsonBulkResult(java.io.InputStream content)
                                      throws java.io.IOException
Create JSON bulk result object.

Throws:
java.io.IOException

SMILA 1.0 API documentation