Class BasicResponseHandler

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String handleEntity​(org.apache.http.HttpEntity entity)
      Returns the entity as a body as a String.
      java.lang.String handleResponse​(org.apache.http.HttpResponse response)
      Read the entity from the response body and pass it to the entity handler method if the response was successful (a 2xx status code).
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BasicResponseHandler

        public BasicResponseHandler()
    • Method Detail

      • handleEntity

        public java.lang.String handleEntity​(org.apache.http.HttpEntity entity)
                                      throws java.io.IOException
        Returns the entity as a body as a String.
        Specified by:
        handleEntity in class AbstractResponseHandler<java.lang.String>
        Throws:
        java.io.IOException
      • handleResponse

        public java.lang.String handleResponse​(org.apache.http.HttpResponse response)
                                        throws HttpResponseException,
                                               java.io.IOException
        Description copied from class: AbstractResponseHandler
        Read the entity from the response body and pass it to the entity handler method if the response was successful (a 2xx status code). If no response body exists, this returns null. If the response was unsuccessful (>= 300 status code), throws an HttpResponseException.
        Specified by:
        handleResponse in interface ResponseHandler<java.lang.String>
        Overrides:
        handleResponse in class AbstractResponseHandler<java.lang.String>
        Parameters:
        response - The response to process
        Returns:
        A value determined by the response
        Throws:
        ClientProtocolException - in case of an http protocol error
        java.io.IOException - in case of a problem or the connection was aborted
        HttpResponseException