Class HttpResponseImpl
- java.lang.Object
-
- org.camunda.connect.impl.AbstractConnectorResponse
-
- org.camunda.connect.impl.AbstractCloseableConnectorResponse
-
- org.camunda.connect.httpclient.impl.HttpResponseImpl
-
- All Implemented Interfaces:
HttpResponse,org.camunda.connect.spi.CloseableConnectorResponse,org.camunda.connect.spi.ConnectorResponse
public class HttpResponseImpl extends org.camunda.connect.impl.AbstractCloseableConnectorResponse implements HttpResponse
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.http.client.methods.CloseableHttpResponsehttpResponse-
Fields inherited from interface org.camunda.connect.httpclient.HttpResponse
PARAM_NAME_RESPONSE, PARAM_NAME_RESPONSE_HEADERS, PARAM_NAME_STATUS_CODE
-
-
Constructor Summary
Constructors Constructor Description HttpResponseImpl(org.apache.http.client.methods.CloseableHttpResponse httpResponse)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcollectResponseHeaders()protected voidcollectResponseParameters(java.util.Map<java.lang.String,java.lang.Object> responseParameters)protected java.io.CloseablegetClosable()java.lang.StringgetHeader(java.lang.String field)java.util.Map<java.lang.String,java.lang.String>getHeaders()java.lang.StringgetResponse()java.lang.IntegergetStatusCode()-
Methods inherited from class org.camunda.connect.impl.AbstractConnectorResponse
getResponseParameter, getResponseParameters
-
-
-
-
Method Detail
-
getStatusCode
public java.lang.Integer getStatusCode()
- Specified by:
getStatusCodein interfaceHttpResponse- Returns:
- the HTTP status code of the response
-
getResponse
public java.lang.String getResponse()
- Specified by:
getResponsein interfaceHttpResponse- Returns:
- the response body or null if non exists
-
getHeaders
public java.util.Map<java.lang.String,java.lang.String> getHeaders()
- Specified by:
getHeadersin interfaceHttpResponse- Returns:
- the response headers
-
getHeader
public java.lang.String getHeader(java.lang.String field)
- Specified by:
getHeaderin interfaceHttpResponse- Returns:
- return the response header value for the given field or null if not set
-
collectResponseParameters
protected void collectResponseParameters(java.util.Map<java.lang.String,java.lang.Object> responseParameters)
- Specified by:
collectResponseParametersin classorg.camunda.connect.impl.AbstractConnectorResponse
-
collectResponseHeaders
protected void collectResponseHeaders()
-
getClosable
protected java.io.Closeable getClosable()
- Specified by:
getClosablein classorg.camunda.connect.impl.AbstractCloseableConnectorResponse
-
-