Class 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
    • 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 void collectResponseHeaders()  
      protected void collectResponseParameters​(java.util.Map<java.lang.String,​java.lang.Object> responseParameters)  
      protected java.io.Closeable getClosable()  
      java.lang.String getHeader​(java.lang.String field)  
      java.util.Map<java.lang.String,​java.lang.String> getHeaders()  
      java.lang.String getResponse()  
      java.lang.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 java.lang.Integer getStatusCode()
        Specified by:
        getStatusCode in interface HttpResponse
        Returns:
        the HTTP status code of the response
      • getResponse

        public java.lang.String getResponse()
        Specified by:
        getResponse in interface HttpResponse
        Returns:
        the response body or null if non exists
      • getHeaders

        public java.util.Map<java.lang.String,​java.lang.String> getHeaders()
        Specified by:
        getHeaders in interface HttpResponse
        Returns:
        the response headers
      • getHeader

        public java.lang.String getHeader​(java.lang.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​(java.util.Map<java.lang.String,​java.lang.Object> responseParameters)
        Specified by:
        collectResponseParameters in class org.camunda.connect.impl.AbstractConnectorResponse
      • collectResponseHeaders

        protected void collectResponseHeaders()
      • getClosable

        protected java.io.Closeable getClosable()
        Specified by:
        getClosable in class org.camunda.connect.impl.AbstractCloseableConnectorResponse