public class BaseResponse extends Object implements Response, Retrievable
| Constructor and Description |
|---|
BaseResponse(int statusCode,
String baseUrl,
byte[] content,
org.apache.http.entity.ContentType contentType,
org.apache.http.Header[] headers,
org.apache.http.HttpHost proxy) |
BaseResponse(int statusCode,
String baseUrl,
byte[] content,
org.apache.http.entity.ContentType contentType,
org.apache.http.Header[] headers,
org.apache.http.HttpHost proxy,
Validator validator,
String sourceId) |
| Modifier and Type | Method and Description |
|---|---|
String |
getBaseUrl()
Returns the base form of the url used in this request
|
byte[] |
getContent()
Returns raw content of the response
|
org.apache.http.entity.ContentType |
getContentType()
Returns the content type of the content fetched
|
org.apache.http.Header[] |
getHeaders()
Returns the headers that were used to trigger this response
|
org.apache.http.HttpHost |
getProxy()
Returns the proxy that was used to trigger this response
|
String |
getSourceId()
Returns the id of the row where an archive of this response
has been insert into a persistent storage
|
int |
getStatusCode()
Returns status code of the response
|
Validator |
getValidator()
Returns the instance of validator used to validate this response
|
BaseResponse |
setSourceId(String sourceId) |
BaseResponse |
setValidator(Validator validator) |
public BaseResponse(int statusCode,
String baseUrl,
byte[] content,
org.apache.http.entity.ContentType contentType,
org.apache.http.Header[] headers,
org.apache.http.HttpHost proxy)
public BaseResponse setSourceId(String sourceId)
public BaseResponse setValidator(Validator validator)
public int getStatusCode()
ResponsegetStatusCode in interface Responsepublic byte[] getContent()
ResponsegetContent in interface Responsepublic org.apache.http.entity.ContentType getContentType()
ResponseThis is provided by the server or guessed by the server or an amalgamation of both
getContentType in interface Responsepublic org.apache.http.Header[] getHeaders()
ResponsegetHeaders in interface Responsepublic String getBaseUrl()
ResponsegetBaseUrl in interface Responsepublic org.apache.http.HttpHost getProxy()
Responsepublic Validator getValidator()
ResponsegetValidator in interface Responsepublic String getSourceId()
RetrievableThis string should be null if no implementation of FileManager is specified during the initialisation of the fetcher
getSourceId in interface RetrievableCopyright © 2018. All rights reserved.