Class ApacheAsyncHttpClient<C>
- java.lang.Object
-
- com.atlassian.httpclient.apache.httpcomponents.ApacheAsyncHttpClient<C>
-
- All Implemented Interfaces:
com.atlassian.httpclient.api.HttpClient
,org.springframework.beans.factory.DisposableBean
public final class ApacheAsyncHttpClient<C> extends Object implements com.atlassian.httpclient.api.HttpClient, org.springframework.beans.factory.DisposableBean
-
-
Constructor Summary
Constructors Constructor Description ApacheAsyncHttpClient(com.atlassian.event.api.EventPublisher eventConsumer, com.atlassian.sal.api.ApplicationProperties applicationProperties, com.atlassian.sal.api.executor.ThreadLocalContextManager<C> threadLocalContextManager)
ApacheAsyncHttpClient(com.atlassian.event.api.EventPublisher eventConsumer, com.atlassian.sal.api.ApplicationProperties applicationProperties, com.atlassian.sal.api.executor.ThreadLocalContextManager<C> threadLocalContextManager, com.atlassian.httpclient.api.factory.HttpClientOptions options)
ApacheAsyncHttpClient(Supplier<String> applicationName, Function<Object,Void> eventConsumer, com.atlassian.sal.api.executor.ThreadLocalContextManager<C> threadLocalContextManager, com.atlassian.httpclient.api.factory.HttpClientOptions options)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroy()
com.atlassian.httpclient.api.ResponsePromise
execute(com.atlassian.httpclient.api.Request request)
void
flushCacheByUriPattern(Pattern urlPattern)
com.atlassian.httpclient.api.Request.Builder
newRequest()
com.atlassian.httpclient.api.Request.Builder
newRequest(String uri)
com.atlassian.httpclient.api.Request.Builder
newRequest(String uri, String contentType, String entity)
com.atlassian.httpclient.api.Request.Builder
newRequest(URI uri)
com.atlassian.httpclient.api.Request.Builder
newRequest(URI uri, String contentType, String entity)
<A> com.atlassian.httpclient.api.ResponseTransformation.Builder<A>
transformation()
-
-
-
Constructor Detail
-
ApacheAsyncHttpClient
public ApacheAsyncHttpClient(com.atlassian.event.api.EventPublisher eventConsumer, com.atlassian.sal.api.ApplicationProperties applicationProperties, com.atlassian.sal.api.executor.ThreadLocalContextManager<C> threadLocalContextManager)
-
ApacheAsyncHttpClient
public ApacheAsyncHttpClient(com.atlassian.event.api.EventPublisher eventConsumer, com.atlassian.sal.api.ApplicationProperties applicationProperties, com.atlassian.sal.api.executor.ThreadLocalContextManager<C> threadLocalContextManager, com.atlassian.httpclient.api.factory.HttpClientOptions options)
-
-
Method Detail
-
execute
public final com.atlassian.httpclient.api.ResponsePromise execute(com.atlassian.httpclient.api.Request request)
- Specified by:
execute
in interfacecom.atlassian.httpclient.api.HttpClient
-
destroy
public void destroy() throws Exception
- Specified by:
destroy
in interfaceorg.springframework.beans.factory.DisposableBean
- Throws:
Exception
-
flushCacheByUriPattern
public void flushCacheByUriPattern(Pattern urlPattern)
- Specified by:
flushCacheByUriPattern
in interfacecom.atlassian.httpclient.api.HttpClient
-
newRequest
public com.atlassian.httpclient.api.Request.Builder newRequest()
- Specified by:
newRequest
in interfacecom.atlassian.httpclient.api.HttpClient
-
newRequest
public com.atlassian.httpclient.api.Request.Builder newRequest(URI uri)
- Specified by:
newRequest
in interfacecom.atlassian.httpclient.api.HttpClient
-
newRequest
public com.atlassian.httpclient.api.Request.Builder newRequest(URI uri, String contentType, String entity)
- Specified by:
newRequest
in interfacecom.atlassian.httpclient.api.HttpClient
-
newRequest
public com.atlassian.httpclient.api.Request.Builder newRequest(String uri)
- Specified by:
newRequest
in interfacecom.atlassian.httpclient.api.HttpClient
-
newRequest
public com.atlassian.httpclient.api.Request.Builder newRequest(String uri, String contentType, String entity)
- Specified by:
newRequest
in interfacecom.atlassian.httpclient.api.HttpClient
-
transformation
public <A> com.atlassian.httpclient.api.ResponseTransformation.Builder<A> transformation()
- Specified by:
transformation
in interfacecom.atlassian.httpclient.api.HttpClient
-
-