Interface HttpClientHandler

  • All Superinterfaces:
    java.lang.AutoCloseable
    All Known Implementing Classes:
    DefaultHttpClientHandler

    public interface HttpClientHandler
    extends java.lang.AutoCloseable
    Interface for a class that contains a HttpClient and a HttpLogger.
    • Method Detail

      • getOrBuildClient

        java.net.http.HttpClient getOrBuildClient()
        Return the internal HttpClient.
        Returns:
        The HttpClient
      • getHttpLogger

        HttpLogger getHttpLogger()
        Returns:
        The HttpLogger to use with this class.
      • close

        void close()

        Shut the HttpClient down by shutting down its ExecutorService.

        Be aware, that there is a shutdown timeout so the Java 11 HttpClient can clean itself up properly. See DefaultHttpClientHandler.Conf.setShutdownTimeout(long).

        Specified by:
        close in interface java.lang.AutoCloseable