Interface HttpClientFactory
public interface HttpClientFactory
Creates configured instances of
HttpClient-
Method Summary
Modifier and TypeMethodDescriptioncreate(HttpClientOptions options) Creates a new instance ofHttpClient<C> HttpClientcreate(HttpClientOptions options, com.atlassian.sal.api.executor.ThreadLocalContextManager<C> threadLocalContextManager) Creates a new instance ofHttpClientvoiddispose(HttpClient httpClient) Disposes the given instance ofHttpClient
-
Method Details
-
create
Creates a new instance ofHttpClient- 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 ofHttpClient- 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
Disposes the given instance ofHttpClient- Parameters:
httpClient- The httpClient to dispose. Cannot be null.- Throws:
Exception- in case of shutdown errors.
-