T - Date type to be createdpublic abstract class AbstractSMPResponseHandler<T> extends Object implements org.apache.http.client.ResponseHandler<T>
ResponseHandler implementation that ensures a leak free
usage of the returned response.
Note: this class is also licensed under Apache 2 license, as it was not part of the original implementation
| Constructor and Description |
|---|
AbstractSMPResponseHandler() |
| Modifier and Type | Method and Description |
|---|---|
abstract T |
handleEntity(org.apache.http.HttpEntity aEntity)
Handle the response entity and transform it into the actual response
object.
|
T |
handleResponse(org.apache.http.HttpResponse aResponse)
Read the entity from the response body and pass it to the entity handler
method if the response was successful (a 2xx status code).
|
@Nullable public abstract T handleEntity(org.apache.http.HttpEntity aEntity) throws IOException
aEntity - The entity to handlenull.IOException - if something goes wrong@Nullable public T handleResponse(org.apache.http.HttpResponse aResponse) throws org.apache.http.client.HttpResponseException, IOException
HttpResponseException.handleResponse in interface org.apache.http.client.ResponseHandler<T>org.apache.http.client.HttpResponseExceptionIOExceptionCopyright © 2015–2017 Philip Helger. All rights reserved.