Class InputStreamResponseListener

    • Constructor Detail

      • InputStreamResponseListener

        public InputStreamResponseListener()
        Deprecated.
    • Method Detail

      • onHeaders

        public void onHeaders​(Response response)
        Deprecated.
        Description copied from interface: Response.HeadersListener
        Callback method invoked when all the response headers have been received and parsed.
        Parameters:
        response - the response containing the response line data and the headers
      • onContent

        public void onContent​(Response response,
                              ByteBuffer content,
                              Callback callback)
        Deprecated.
        Description copied from interface: Response.AsyncContentListener
        Callback method invoked when the response content has been received, parsed and there is demand. The callback object should be succeeded to signal that the content buffer has been consumed and to demand more content.
        Parameters:
        response - the response containing the response line data and the headers
        content - the content bytes received
        callback - the callback to call when the content is consumed and to demand more content
      • onSuccess

        public void onSuccess​(Response response)
        Deprecated.
        Description copied from interface: Response.SuccessListener
        Callback method invoked when the whole response has been successfully received.
        Parameters:
        response - the response containing the response line data and the headers
      • onFailure

        public void onFailure​(Response response,
                              Throwable failure)
        Deprecated.
        Description copied from interface: Response.FailureListener
        Callback method invoked when the response has failed in the process of being received
        Parameters:
        response - the response containing data up to the point the failure happened
        failure - the failure happened
      • onComplete

        public void onComplete​(Result result)
        Deprecated.
        Description copied from interface: Response.CompleteListener
        Callback method invoked when the request and the response have been processed, either successfully or not.

        The result parameter contains the request, the response, and eventual failures.

        Requests may complete after response, for example in case of big uploads that are discarded or read asynchronously by the server. This method is always invoked after Response.SuccessListener.onSuccess(Response) or Response.FailureListener.onFailure(Response, Throwable), and only when request indicates that it is completed.

        Parameters:
        result - the result of the request / response exchange
      • getInputStream

        public InputStream getInputStream()
        Deprecated.
        Returns an InputStream providing the response content bytes.

        The method may be invoked only once; subsequent invocations will return a closed InputStream.

        Returns:
        an input stream providing the response content