public abstract class AbstractResponseHandler<T,P> extends Object implements org.apache.http.client.ResponseHandler<T>
| Modifier and Type | Field and Description |
|---|---|
protected static org.slf4j.Logger |
logger |
protected org.apache.http.entity.ContentType |
myContentType |
protected Class<P> |
parameterType |
protected Class<T> |
returnType |
| Constructor and Description |
|---|
AbstractResponseHandler(org.apache.http.entity.ContentType type,
Class<T>... returnTypes) |
AbstractResponseHandler(org.apache.http.entity.ContentType type,
int status,
Class<T>... returnTypes) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract T |
deserialize(String content) |
T |
handleResponse(org.apache.http.HttpResponse response) |
abstract String |
serialize(Object entity) |
protected static final org.slf4j.Logger logger
protected final org.apache.http.entity.ContentType myContentType
public AbstractResponseHandler(org.apache.http.entity.ContentType type,
int status,
Class<T>... returnTypes)
public T handleResponse(org.apache.http.HttpResponse response) throws org.apache.http.client.ClientProtocolException, IOException
handleResponse in interface org.apache.http.client.ResponseHandler<T>org.apache.http.client.ClientProtocolExceptionIOExceptionCopyright © 2001–2015 JBoss by Red Hat. All rights reserved.