Class 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)  
    • 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)
      • ApacheAsyncHttpClient

        public ApacheAsyncHttpClient​(Supplier<String> applicationName,
                                     Function<Object,​Void> eventConsumer,
                                     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 interface com.atlassian.httpclient.api.HttpClient
      • destroy

        public void destroy()
                     throws Exception
        Specified by:
        destroy in interface org.springframework.beans.factory.DisposableBean
        Throws:
        Exception
      • flushCacheByUriPattern

        public void flushCacheByUriPattern​(Pattern urlPattern)
        Specified by:
        flushCacheByUriPattern in interface com.atlassian.httpclient.api.HttpClient
      • newRequest

        public com.atlassian.httpclient.api.Request.Builder newRequest()
        Specified by:
        newRequest in interface com.atlassian.httpclient.api.HttpClient
      • newRequest

        public com.atlassian.httpclient.api.Request.Builder newRequest​(URI uri)
        Specified by:
        newRequest in interface com.atlassian.httpclient.api.HttpClient
      • newRequest

        public com.atlassian.httpclient.api.Request.Builder newRequest​(URI uri,
                                                                       String contentType,
                                                                       String entity)
        Specified by:
        newRequest in interface com.atlassian.httpclient.api.HttpClient
      • newRequest

        public com.atlassian.httpclient.api.Request.Builder newRequest​(String uri)
        Specified by:
        newRequest in interface com.atlassian.httpclient.api.HttpClient
      • newRequest

        public com.atlassian.httpclient.api.Request.Builder newRequest​(String uri,
                                                                       String contentType,
                                                                       String entity)
        Specified by:
        newRequest in interface com.atlassian.httpclient.api.HttpClient
      • transformation

        public <A> com.atlassian.httpclient.api.ResponseTransformation.Builder<A> transformation()
        Specified by:
        transformation in interface com.atlassian.httpclient.api.HttpClient