org.camunda.connect.httpclient.impl
Class HttpResponseImpl

java.lang.Object
  extended by org.camunda.connect.impl.AbstractConnectorResponse
      extended by org.camunda.connect.impl.AbstractCloseableConnectorResponse
          extended by org.camunda.connect.httpclient.impl.HttpResponseImpl
All Implemented Interfaces:
HttpResponse, CloseableConnectorResponse, ConnectorResponse

public class HttpResponseImpl
extends AbstractCloseableConnectorResponse
implements HttpResponse


Field Summary
protected  org.apache.http.client.methods.CloseableHttpResponse httpResponse
           
 
Fields inherited from class org.camunda.connect.impl.AbstractConnectorResponse
responseParameters
 
Fields inherited from interface org.camunda.connect.httpclient.HttpResponse
PARAM_NAME_RESPONSE, PARAM_NAME_RESPONSE_HEADERS, PARAM_NAME_STATUS_CODE
 
Constructor Summary
HttpResponseImpl(org.apache.http.client.methods.CloseableHttpResponse httpResponse)
           
 
Method Summary
protected  void collectResponseHeaders()
           
protected  void collectResponseParameters(Map<String,Object> responseParameters)
           
protected  Closeable getClosable()
           
 String getHeader(String field)
           
 Map<String,String> getHeaders()
           
 String getResponse()
           
 Integer getStatusCode()
           
 
Methods inherited from class org.camunda.connect.impl.AbstractCloseableConnectorResponse
close
 
Methods inherited from class org.camunda.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.camunda.connect.spi.CloseableConnectorResponse
close
 
Methods inherited from interface org.camunda.connect.spi.ConnectorResponse
getResponseParameter, getResponseParameters
 

Field Detail

httpResponse

protected org.apache.http.client.methods.CloseableHttpResponse httpResponse
Constructor Detail

HttpResponseImpl

public HttpResponseImpl(org.apache.http.client.methods.CloseableHttpResponse httpResponse)
Method Detail

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)
Specified by:
collectResponseParameters in class AbstractConnectorResponse

collectResponseHeaders

protected void collectResponseHeaders()

getClosable

protected Closeable getClosable()
Specified by:
getClosable in class AbstractCloseableConnectorResponse


Copyright © 2014 camunda services GmbH. All rights reserved.