Interface HttpClientFactory


public interface HttpClientFactory
Creates configured instances of HttpClient
  • Method Details

    • create

      @Nonnull HttpClient create(@Nonnull HttpClientOptions options)
      Creates a new instance of HttpClient
      Parameters:
      options - The http client options. Cannot be null.
      Returns:
      The new instance. Will never be null
      See Also:
    • create

      @Nonnull <C> HttpClient create(@Nonnull HttpClientOptions options, @Nonnull com.atlassian.sal.api.executor.ThreadLocalContextManager<C> threadLocalContextManager)
      Creates a new instance of HttpClient
      Type Parameters:
      C - the context type
      Parameters:
      options - The http client options. Cannot be null.
      threadLocalContextManager - the manager for thread local variables. Cannot be null.
      Returns:
      The new instance. Will never be null
      See Also:
    • dispose

      void dispose(@Nonnull HttpClient httpClient) throws Exception
      Disposes the given instance of HttpClient
      Parameters:
      httpClient - The httpClient to dispose. Cannot be null.
      Throws:
      Exception - in case of shutdown errors.