Class HttpResponseImpl
java.lang.Object
org.eximeebpms.connect.impl.AbstractConnectorResponse
org.eximeebpms.connect.impl.AbstractCloseableConnectorResponse
org.eximeebpms.connect.httpclient.impl.HttpResponseImpl
- All Implemented Interfaces:
HttpResponse
,CloseableConnectorResponse
,ConnectorResponse
- Direct Known Subclasses:
SoapHttpResponseImpl
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.apache.http.client.methods.CloseableHttpResponse
Fields inherited from class org.eximeebpms.connect.impl.AbstractConnectorResponse
responseParameters
Fields inherited from interface org.eximeebpms.connect.httpclient.HttpResponse
PARAM_NAME_RESPONSE, PARAM_NAME_RESPONSE_HEADERS, PARAM_NAME_STATUS_CODE
-
Constructor Summary
ConstructorsConstructorDescriptionHttpResponseImpl
(org.apache.http.client.methods.CloseableHttpResponse httpResponse) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected void
collectResponseParameters
(Map<String, Object> responseParameters) To be implemented by subclasses for collecting the generic response parameters of a response.protected Closeable
Allows subclasses to provide the closeable resource.Methods inherited from class org.eximeebpms.connect.impl.AbstractCloseableConnectorResponse
close
Methods inherited from class org.eximeebpms.connect.impl.AbstractConnectorResponse
getResponseParameter, getResponseParameters
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eximeebpms.connect.spi.CloseableConnectorResponse
close
Methods inherited from interface org.eximeebpms.connect.spi.ConnectorResponse
getResponseParameter, getResponseParameters
-
Field Details
-
httpResponse
protected org.apache.http.client.methods.CloseableHttpResponse httpResponse
-
-
Constructor Details
-
HttpResponseImpl
public HttpResponseImpl(org.apache.http.client.methods.CloseableHttpResponse httpResponse)
-
-
Method Details
-
getStatusCode
- Specified by:
getStatusCode
in interfaceHttpResponse
- Returns:
- the HTTP status code of the response
-
getResponse
- Specified by:
getResponse
in interfaceHttpResponse
- Returns:
- the response body or null if non exists
-
getHeaders
- Specified by:
getHeaders
in interfaceHttpResponse
- Returns:
- the response headers
-
getHeader
- Specified by:
getHeader
in interfaceHttpResponse
- Returns:
- return the response header value for the given field or null if not set
-
collectResponseParameters
Description copied from class:AbstractConnectorResponse
To be implemented by subclasses for collecting the generic response parameters of a response.- Specified by:
collectResponseParameters
in classAbstractConnectorResponse
- Parameters:
responseParameters
- a map to save the response parameters in
-
collectResponseHeaders
protected void collectResponseHeaders() -
getClosable
Description copied from class:AbstractCloseableConnectorResponse
Allows subclasses to provide the closeable resource.- Specified by:
getClosable
in classAbstractCloseableConnectorResponse
- Returns:
- the
Closeable
resource
-