Interface ProxyResponse
-
- All Known Implementing Classes:
ProxyResponseImpl
public interface ProxyResponseRepresents an HTTP response from a proxy.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddContent(java.nio.ByteBuffer contents)Adds contents to the body if it is missing content.java.nio.ByteBuffergetContents()Gets the HTTP response body.java.lang.StringgetError()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.HttpStatusLinegetStatus()Gets the HTTP status line.booleanisMissingContent()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:
trueif the HTTP response is complete, andfalseotherwise.
-
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.
-
-