Interface IDatabricksHttpClient

  • All Known Implementing Classes:
    DatabricksHttpClient

    public interface IDatabricksHttpClient
    Http client interface for executing http requests.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      org.apache.http.client.methods.CloseableHttpResponse execute​(org.apache.http.client.methods.HttpUriRequest request)
      Executes the given http request and returns the response
      org.apache.http.client.methods.CloseableHttpResponse execute​(org.apache.http.client.methods.HttpUriRequest request, boolean supportGzipEncoding)
      Executes the given http request and returns the response
      <T> Future<T> executeAsync​(org.apache.hc.core5.http.nio.AsyncRequestProducer requestProducer, org.apache.hc.core5.http.nio.AsyncResponseConsumer<T> responseConsumer, org.apache.hc.core5.concurrent.FutureCallback<T> callback)
      Executes the given http request asynchronously and returns the future
    • Method Detail

      • execute

        org.apache.http.client.methods.CloseableHttpResponse execute​(org.apache.http.client.methods.HttpUriRequest request)
                                                              throws DatabricksHttpException
        Executes the given http request and returns the response
        Parameters:
        request - underlying http request
        Returns:
        http response
        Throws:
        DatabricksHttpException
      • execute

        org.apache.http.client.methods.CloseableHttpResponse execute​(org.apache.http.client.methods.HttpUriRequest request,
                                                                     boolean supportGzipEncoding)
                                                              throws DatabricksHttpException
        Executes the given http request and returns the response
        Parameters:
        request - underlying http request
        supportGzipEncoding - whether to support gzip encoding header
        Returns:
        http response
        Throws:
        DatabricksHttpException
      • executeAsync

        <T> Future<T> executeAsync​(org.apache.hc.core5.http.nio.AsyncRequestProducer requestProducer,
                                   org.apache.hc.core5.http.nio.AsyncResponseConsumer<T> responseConsumer,
                                   org.apache.hc.core5.concurrent.FutureCallback<T> callback)
        Executes the given http request asynchronously and returns the future
        Type Parameters:
        T - type of the response
        Parameters:
        requestProducer - request producer
        responseConsumer - response consumer
        callback - future callback
        Returns:
        future