public abstract class AbstractCommand<M extends org.apache.http.client.methods.HttpRequestBase,N> extends Object implements Callable<N>, Closeable
| Modifier and Type | Field and Description |
|---|---|
static org.slf4j.Logger |
LOG |
protected M |
request |
protected org.apache.http.HttpResponse |
response |
| Constructor and Description |
|---|
AbstractCommand(org.apache.http.client.HttpClient httpClient,
String url) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addHeaders(Collection<? extends Header> headers) |
N |
call() |
void |
close() |
protected boolean |
closeStreamAutomatically() |
protected org.codehaus.jackson.map.ObjectMapper |
createObjectMapper(boolean dealWithRootValue) |
protected abstract M |
createRequest(String url) |
protected N |
getReturnObject(org.apache.http.HttpResponse response) |
protected abstract HttpStatusChecker[] |
getStatusCheckers() |
protected void |
modifyURI(QueryParameters queryParameters) |
void |
setAllowErrorLog(boolean allowErrorLog) |
protected void |
setHeader(Header header) |
public static final org.slf4j.Logger LOG
protected M extends org.apache.http.client.methods.HttpRequestBase request
protected org.apache.http.HttpResponse response
public AbstractCommand(org.apache.http.client.HttpClient httpClient,
String url)
public void setAllowErrorLog(boolean allowErrorLog)
protected void setHeader(Header header)
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionprotected boolean closeStreamAutomatically()
protected void addHeaders(Collection<? extends Header> headers)
protected abstract HttpStatusChecker[] getStatusCheckers()
protected N getReturnObject(org.apache.http.HttpResponse response) throws IOException
IOExceptionprotected void modifyURI(QueryParameters queryParameters)
protected org.codehaus.jackson.map.ObjectMapper createObjectMapper(boolean dealWithRootValue)
Copyright © 2012-2017 42 BV. All Rights Reserved.