Interface ProxyResponse

  • All Known Implementing Classes:
    ProxyResponseImpl

    public interface ProxyResponse
    Represents an HTTP response from a proxy.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void addContent​(java.nio.ByteBuffer contents)
      Adds contents to the body if it is missing content.
      java.nio.ByteBuffer getContents()
      Gets the HTTP response body.
      java.lang.String getError()
      Gets the HTTP response body as an error.
      java.util.Map<java.lang.String,​java.util.List<java.lang.String>> getHeaders()
      Gets the headers for the HTTP response.
      HttpStatusLine getStatus()
      Gets the HTTP status line.
      boolean isMissingContent()
      Gets whether or not the HTTP response is complete.
    • Method Detail

      • getHeaders

        java.util.Map<java.lang.String,​java.util.List<java.lang.String>> getHeaders()
        Gets the headers for the HTTP response.
        Returns:
        The headers for the HTTP response.
      • getStatus

        HttpStatusLine getStatus()
        Gets the HTTP status line.
        Returns:
        The HTTP status line.
      • getContents

        java.nio.ByteBuffer getContents()
        Gets the HTTP response body.
        Returns:
        The HTTP response body.
      • getError

        java.lang.String getError()
        Gets the HTTP response body as an error.
        Returns:
        If there is no HTTP response body, an empty string is returned.
      • isMissingContent

        boolean isMissingContent()
        Gets whether or not the HTTP response is complete. An HTTP response is complete when the HTTP header and body are received.
        Returns:
        true if the HTTP response is complete, and false otherwise.
      • addContent

        void addContent​(java.nio.ByteBuffer contents)
        Adds contents to the body if it is missing content.
        Parameters:
        contents - Contents to add to the HTTP body.