Class HttpResponseImpl
java.lang.Object
org.operaton.connect.impl.AbstractConnectorResponse
org.operaton.connect.impl.AbstractCloseableConnectorResponse
org.operaton.connect.httpclient.impl.HttpResponseImpl
- All Implemented Interfaces:
HttpResponse,CloseableConnectorResponse,ConnectorResponse
- Direct Known Subclasses:
SoapHttpResponseImpl
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.apache.hc.core5.http.ClassicHttpResponseFields inherited from class org.operaton.connect.impl.AbstractConnectorResponse
responseParametersFields inherited from interface org.operaton.connect.httpclient.HttpResponse
PARAM_NAME_RESPONSE, PARAM_NAME_RESPONSE_HEADERS, PARAM_NAME_STATUS_CODE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voidcollectResponseParameters(Map<String, Object> responseParameters) To be implemented by subclasses for collecting the generic response parameters of a response.protected CloseableAllows subclasses to provide the closeable resource.Methods inherited from class org.operaton.connect.impl.AbstractCloseableConnectorResponse
closeMethods inherited from class org.operaton.connect.impl.AbstractConnectorResponse
getResponseParameter, getResponseParametersMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.operaton.connect.spi.CloseableConnectorResponse
closeMethods inherited from interface org.operaton.connect.spi.ConnectorResponse
getResponseParameter, getResponseParameters
-
Field Details
-
httpResponse
protected org.apache.hc.core5.http.ClassicHttpResponse httpResponse
-
-
Constructor Details
-
HttpResponseImpl
public HttpResponseImpl(org.apache.hc.core5.http.ClassicHttpResponse httpResponse)
-
-
Method Details
-
getStatusCode
- Specified by:
getStatusCodein interfaceHttpResponse- Returns:
- the HTTP status code of the response
-
getResponse
- Specified by:
getResponsein interfaceHttpResponse- Returns:
- the response body or null if non exists
-
getHeaders
- Specified by:
getHeadersin interfaceHttpResponse- Returns:
- the response headers
-
getHeader
- Specified by:
getHeaderin interfaceHttpResponse- Returns:
- return the response header value for the given field or null if not set
-
collectResponseParameters
Description copied from class:AbstractConnectorResponseTo be implemented by subclasses for collecting the generic response parameters of a response.- Specified by:
collectResponseParametersin classAbstractConnectorResponse- Parameters:
responseParameters- a map to save the response parameters in
-
collectResponseHeaders
protected void collectResponseHeaders() -
getClosable
Description copied from class:AbstractCloseableConnectorResponseAllows subclasses to provide the closeable resource.- Specified by:
getClosablein classAbstractCloseableConnectorResponse- Returns:
- the
Closeableresource
-