org.camunda.connect.httpclient.impl
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, CloseableConnectorResponse, ConnectorResponse
- Direct Known Subclasses:
- SoapHttpResponseImpl
public class HttpResponseImpl
- extends AbstractCloseableConnectorResponse
- implements HttpResponse
|
Field Summary |
protected org.apache.http.client.methods.CloseableHttpResponse |
httpResponse
|
|
Constructor Summary |
HttpResponseImpl(org.apache.http.client.methods.CloseableHttpResponse httpResponse)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
httpResponse
protected org.apache.http.client.methods.CloseableHttpResponse httpResponse
HttpResponseImpl
public HttpResponseImpl(org.apache.http.client.methods.CloseableHttpResponse httpResponse)
getStatusCode
public Integer getStatusCode()
- Specified by:
getStatusCode in interface HttpResponse
- Returns:
- the HTTP status code of the response
getResponse
public String getResponse()
- Specified by:
getResponse in interface HttpResponse
- Returns:
- the response body or null if non exists
getHeaders
public Map<String,String> getHeaders()
- Specified by:
getHeaders in interface HttpResponse
- Returns:
- the response headers
getHeader
public String getHeader(String field)
- Specified by:
getHeader in interface HttpResponse
- Returns:
- return the response header value for the given field or null if not set
collectResponseParameters
protected void collectResponseParameters(Map<String,Object> responseParameters)
- Description copied from class:
AbstractConnectorResponse
- To be implemented by subclasses for collecting the generic response parameters of a response.
- Specified by:
collectResponseParameters in class AbstractConnectorResponse
- Parameters:
responseParameters - a map to save the response parameters in
collectResponseHeaders
protected void collectResponseHeaders()
getClosable
protected Closeable getClosable()
- Description copied from class:
AbstractCloseableConnectorResponse
- Allows subclasses to provide the closeable resource.
- Specified by:
getClosable in class AbstractCloseableConnectorResponse
- Returns:
- the
Closeable resource
Copyright © 2016 camunda services GmbH. All rights reserved.