public final class DefaultHttpClientFactory<C> extends Object implements HttpClientFactory, org.springframework.beans.factory.DisposableBean
| Constructor and Description |
|---|
DefaultHttpClientFactory(com.atlassian.event.api.EventPublisher eventPublisher,
com.atlassian.sal.api.ApplicationProperties applicationProperties,
com.atlassian.sal.api.executor.ThreadLocalContextManager<C> threadLocalContextManager) |
| Modifier and Type | Method and Description |
|---|---|
HttpClient |
create(HttpClientOptions options)
Creates a new instance of
HttpClient |
<C> HttpClient |
create(HttpClientOptions options,
com.atlassian.sal.api.executor.ThreadLocalContextManager<C> threadLocalContextManager)
Creates a new instance of
HttpClient |
void |
destroy() |
void |
dispose(HttpClient httpClient)
Disposes the given instance of
HttpClient |
@Nonnull public HttpClient create(@Nonnull HttpClientOptions options)
HttpClientFactoryHttpClientcreate in interface HttpClientFactoryoptions - The http client options. Cannot be null.HttpClientFactory.create(HttpClientOptions, ThreadLocalContextManager)@Nonnull public <C> HttpClient create(@Nonnull HttpClientOptions options, @Nonnull com.atlassian.sal.api.executor.ThreadLocalContextManager<C> threadLocalContextManager)
HttpClientFactoryHttpClientcreate in interface HttpClientFactoryC - the context typeoptions - The http client options. Cannot be null.threadLocalContextManager - the manager for thread local variables. Cannot be null.HttpClientFactory.create(HttpClientOptions)public void dispose(@Nonnull HttpClient httpClient) throws Exception
HttpClientFactoryHttpClientdispose in interface HttpClientFactoryhttpClient - The httpClient to dispose. Cannot be null.Exception - in case of shutdown errors.Copyright © 2012–2018 Atlassian. All rights reserved.