com.atlassian.httpclient.api.factory
Interface HttpClientFactory


public interface HttpClientFactory

Creates configured instances of HttpClient


Method Summary
 HttpClient create(HttpClientOptions options)
          Creates a new instance of HttpClient
 HttpClient create(HttpClientOptions options, com.atlassian.sal.api.executor.ThreadLocalContextManager threadLocalContextManager)
          Creates a new instance of HttpClient
 void dispose(HttpClient httpClient)
          Disposes the given instance of HttpClient
 

Method Detail

create

@NotNull
HttpClient create(@NotNull
                          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(HttpClientOptions, ThreadLocalContextManager)

create

@NotNull
HttpClient create(@NotNull
                          HttpClientOptions options,
                          @NotNull
                          com.atlassian.sal.api.executor.ThreadLocalContextManager threadLocalContextManager)
Creates a new instance of HttpClient

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:
create(HttpClientOptions)

dispose

void dispose(@NotNull
             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.


Copyright © 2012–2015 Atlassian. All rights reserved.