public class HttpToolResponse extends java.lang.Object implements HttpPollValue
Constructor and Description |
---|
HttpToolResponse(org.apache.http.HttpResponse response,
long startTime) |
HttpToolResponse(int responseCode,
java.util.Map<java.lang.String,java.util.List<java.lang.String>> headers,
byte[] content,
long startTime,
long durationMillisOfFirstResponse,
long durationMillisOfFullContent) |
Modifier and Type | Method and Description |
---|---|
byte[] |
getContent() |
java.lang.String |
getContentAsString() |
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
getHeaderLists() |
long |
getLatencyFirstResponse()
returns latency, in milliseconds, before response started coming in
|
long |
getLatencyFullContent()
returns latency, in milliseconds, if value was initialized with a start time
|
java.lang.String |
getReasonPhrase() |
Maybe<org.apache.http.HttpResponse> |
getResponse() |
int |
getResponseCode() |
long |
getStartTime()
returns the timestamp (millis since 1970) when this request was started
|
java.lang.String |
toString() |
public HttpToolResponse(org.apache.http.HttpResponse response, long startTime)
public HttpToolResponse(int responseCode, java.util.Map<java.lang.String,java.util.List<java.lang.String>> headers, byte[] content, long startTime, long durationMillisOfFirstResponse, long durationMillisOfFullContent)
public int getResponseCode()
getResponseCode
in interface HttpPollValue
public java.lang.String getReasonPhrase()
getReasonPhrase
in interface HttpPollValue
public long getStartTime()
getStartTime
in interface HttpPollValue
public long getLatencyFullContent()
getLatencyFullContent
in interface HttpPollValue
public long getLatencyFirstResponse()
getLatencyFirstResponse
in interface HttpPollValue
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getHeaderLists()
getHeaderLists
in interface HttpPollValue
public byte[] getContent()
getContent
in interface HttpPollValue
public java.lang.String getContentAsString()
public Maybe<org.apache.http.HttpResponse> getResponse()
public java.lang.String toString()
toString
in class java.lang.Object