Class AbstractHttpAsyncClient

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private ClientAsyncConnectionManager connmgr
      Deprecated.
       
      private org.apache.http.client.CookieStore cookieStore
      Deprecated.
       
      private org.apache.http.client.CredentialsProvider credsProvider
      Deprecated.
       
      private org.apache.http.conn.ConnectionKeepAliveStrategy keepAliveStrategy
      Deprecated.
       
      private org.apache.commons.logging.Log log
      Deprecated.
       
      private org.apache.http.protocol.BasicHttpProcessor mutableProcessor
      Deprecated.
       
      private org.apache.http.params.HttpParams params
      Deprecated.
       
      private org.apache.http.protocol.ImmutableHttpProcessor protocolProcessor
      Deprecated.
       
      private org.apache.http.client.AuthenticationStrategy proxyAuthStrategy
      Deprecated.
       
      private java.util.Queue<org.apache.http.nio.protocol.HttpAsyncRequestExecutionHandler<?>> queue
      Deprecated.
       
      private java.lang.Thread reactorThread
      Deprecated.
       
      private org.apache.http.client.RedirectStrategy redirectStrategy
      Deprecated.
       
      private org.apache.http.ConnectionReuseStrategy reuseStrategy
      Deprecated.
       
      private org.apache.http.conn.routing.HttpRoutePlanner routePlanner
      Deprecated.
       
      private org.apache.http.auth.AuthSchemeRegistry supportedAuthSchemes
      Deprecated.
       
      private org.apache.http.cookie.CookieSpecRegistry supportedCookieSpecs
      Deprecated.
       
      private org.apache.http.client.AuthenticationStrategy targetAuthStrategy
      Deprecated.
       
      private boolean terminated
      Deprecated.
       
      private org.apache.http.client.UserTokenHandler userTokenHandler
      Deprecated.
       
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void addRequestInterceptor​(org.apache.http.HttpRequestInterceptor itcp)
      Deprecated.
       
      void addRequestInterceptor​(org.apache.http.HttpRequestInterceptor itcp, int index)
      Deprecated.
       
      void addResponseInterceptor​(org.apache.http.HttpResponseInterceptor itcp)
      Deprecated.
       
      void addResponseInterceptor​(org.apache.http.HttpResponseInterceptor itcp, int index)
      Deprecated.
       
      void clearRequestInterceptors()
      Deprecated.
       
      void clearResponseInterceptors()
      Deprecated.
       
      protected org.apache.http.auth.AuthSchemeRegistry createAuthSchemeRegistry()
      Deprecated.
       
      protected org.apache.http.conn.ConnectionKeepAliveStrategy createConnectionKeepAliveStrategy()
      Deprecated.
       
      protected org.apache.http.ConnectionReuseStrategy createConnectionReuseStrategy()
      Deprecated.
       
      protected org.apache.http.cookie.CookieSpecRegistry createCookieSpecRegistry()
      Deprecated.
       
      protected org.apache.http.client.CookieStore createCookieStore()
      Deprecated.
       
      protected org.apache.http.client.CredentialsProvider createCredentialsProvider()
      Deprecated.
       
      protected org.apache.http.protocol.HttpContext createHttpContext()
      Deprecated.
       
      protected abstract org.apache.http.params.HttpParams createHttpParams()
      Deprecated.
       
      protected abstract org.apache.http.protocol.BasicHttpProcessor createHttpProcessor()
      Deprecated.
       
      protected org.apache.http.conn.routing.HttpRoutePlanner createHttpRoutePlanner()
      Deprecated.
       
      protected org.apache.http.client.AuthenticationStrategy createProxyAuthenticationStrategy()
      Deprecated.
       
      protected org.apache.http.client.AuthenticationStrategy createTargetAuthenticationStrategy()
      Deprecated.
       
      protected org.apache.http.client.UserTokenHandler createUserTokenHandler()
      Deprecated.
       
      private org.apache.http.HttpHost determineTarget​(org.apache.http.client.methods.HttpUriRequest request)
      Deprecated.
       
      private void doExecute()
      Deprecated.
       
      java.util.concurrent.Future<org.apache.http.HttpResponse> execute​(org.apache.http.client.methods.HttpUriRequest request, org.apache.http.concurrent.FutureCallback<org.apache.http.HttpResponse> callback)
      Deprecated.
      Initiates asynchronous HTTP request execution.
      java.util.concurrent.Future<org.apache.http.HttpResponse> execute​(org.apache.http.client.methods.HttpUriRequest request, org.apache.http.protocol.HttpContext context, org.apache.http.concurrent.FutureCallback<org.apache.http.HttpResponse> callback)
      Deprecated.
      Initiates asynchronous HTTP request execution using the given context.
      java.util.concurrent.Future<org.apache.http.HttpResponse> execute​(org.apache.http.HttpHost target, org.apache.http.HttpRequest request, org.apache.http.concurrent.FutureCallback<org.apache.http.HttpResponse> callback)
      Deprecated.
      Initiates asynchronous HTTP request execution against the given target.
      java.util.concurrent.Future<org.apache.http.HttpResponse> execute​(org.apache.http.HttpHost target, org.apache.http.HttpRequest request, org.apache.http.protocol.HttpContext context, org.apache.http.concurrent.FutureCallback<org.apache.http.HttpResponse> callback)
      Deprecated.
      Initiates asynchronous HTTP request execution against the given target using the given context.
      <T> java.util.concurrent.Future<T> execute​(org.apache.http.nio.protocol.HttpAsyncRequestProducer requestProducer, org.apache.http.nio.protocol.HttpAsyncResponseConsumer<T> responseConsumer, org.apache.http.concurrent.FutureCallback<T> callback)
      Deprecated.
      Initiates asynchronous HTTP request execution using the default context.
      <T> java.util.concurrent.Future<T> execute​(org.apache.http.nio.protocol.HttpAsyncRequestProducer requestProducer, org.apache.http.nio.protocol.HttpAsyncResponseConsumer<T> responseConsumer, org.apache.http.protocol.HttpContext context, org.apache.http.concurrent.FutureCallback<T> callback)
      Deprecated.
      Initiates asynchronous HTTP request execution using the given context.
      org.apache.http.auth.AuthSchemeRegistry getAuthSchemes()
      Deprecated.
       
      org.apache.http.conn.ConnectionKeepAliveStrategy getConnectionKeepAliveStrategy()
      Deprecated.
       
      ClientAsyncConnectionManager getConnectionManager()
      Deprecated.
       
      org.apache.http.ConnectionReuseStrategy getConnectionReuseStrategy()
      Deprecated.
       
      org.apache.http.cookie.CookieSpecRegistry getCookieSpecs()
      Deprecated.
       
      org.apache.http.client.CookieStore getCookieStore()
      Deprecated.
       
      org.apache.http.client.CredentialsProvider getCredentialsProvider()
      Deprecated.
       
      protected org.apache.http.protocol.BasicHttpProcessor getHttpProcessor()
      Deprecated.
       
      org.apache.http.params.HttpParams getParams()
      Deprecated.
       
      private org.apache.http.protocol.HttpProcessor getProtocolProcessor()
      Deprecated.
       
      org.apache.http.client.AuthenticationStrategy getProxyAuthenticationStrategy()
      Deprecated.
       
      org.apache.http.client.RedirectStrategy getRedirectStrategy()
      Deprecated.
       
      org.apache.http.HttpRequestInterceptor getRequestInterceptor​(int index)
      Deprecated.
       
      int getRequestInterceptorCount()
      Deprecated.
       
      org.apache.http.HttpResponseInterceptor getResponseInterceptor​(int index)
      Deprecated.
       
      int getResponseInterceptorCount()
      Deprecated.
       
      org.apache.http.conn.routing.HttpRoutePlanner getRoutePlanner()
      Deprecated.
       
      org.apache.http.nio.reactor.IOReactorStatus getStatus()
      Deprecated.
       
      org.apache.http.client.AuthenticationStrategy getTargetAuthenticationStrategy()
      Deprecated.
       
      org.apache.http.client.UserTokenHandler getUserTokenHandler()
      Deprecated.
       
      void removeRequestInterceptorByClass​(java.lang.Class<? extends org.apache.http.HttpRequestInterceptor> clazz)
      Deprecated.
       
      void removeResponseInterceptorByClass​(java.lang.Class<? extends org.apache.http.HttpResponseInterceptor> clazz)
      Deprecated.
       
      void setAuthSchemes​(org.apache.http.auth.AuthSchemeRegistry authSchemeRegistry)
      Deprecated.
       
      void setCookieSpecs​(org.apache.http.cookie.CookieSpecRegistry cookieSpecRegistry)
      Deprecated.
       
      void setCookieStore​(org.apache.http.client.CookieStore cookieStore)
      Deprecated.
       
      void setCredentialsProvider​(org.apache.http.client.CredentialsProvider credsProvider)
      Deprecated.
       
      void setKeepAliveStrategy​(org.apache.http.conn.ConnectionKeepAliveStrategy keepAliveStrategy)
      Deprecated.
       
      void setParams​(org.apache.http.params.HttpParams params)
      Deprecated.
       
      void setProxyAuthenticationStrategy​(org.apache.http.client.AuthenticationStrategy proxyAuthStrategy)
      Deprecated.
       
      void setRedirectStrategy​(org.apache.http.client.RedirectStrategy redirectStrategy)
      Deprecated.
       
      void setReuseStrategy​(org.apache.http.ConnectionReuseStrategy reuseStrategy)
      Deprecated.
       
      void setRoutePlanner​(org.apache.http.conn.routing.HttpRoutePlanner routePlanner)
      Deprecated.
       
      void setTargetAuthenticationStrategy​(org.apache.http.client.AuthenticationStrategy targetAuthStrategy)
      Deprecated.
       
      void setUserTokenHandler​(org.apache.http.client.UserTokenHandler userTokenHandler)
      Deprecated.
       
      void shutdown()
      Deprecated.
       
      void start()
      Deprecated.
       
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • log

        private final org.apache.commons.logging.Log log
        Deprecated.
      • queue

        private final java.util.Queue<org.apache.http.nio.protocol.HttpAsyncRequestExecutionHandler<?>> queue
        Deprecated.
      • reactorThread

        private java.lang.Thread reactorThread
        Deprecated.
      • mutableProcessor

        private org.apache.http.protocol.BasicHttpProcessor mutableProcessor
        Deprecated.
      • protocolProcessor

        private org.apache.http.protocol.ImmutableHttpProcessor protocolProcessor
        Deprecated.
      • reuseStrategy

        private org.apache.http.ConnectionReuseStrategy reuseStrategy
        Deprecated.
      • keepAliveStrategy

        private org.apache.http.conn.ConnectionKeepAliveStrategy keepAliveStrategy
        Deprecated.
      • redirectStrategy

        private org.apache.http.client.RedirectStrategy redirectStrategy
        Deprecated.
      • supportedCookieSpecs

        private org.apache.http.cookie.CookieSpecRegistry supportedCookieSpecs
        Deprecated.
      • cookieStore

        private org.apache.http.client.CookieStore cookieStore
        Deprecated.
      • supportedAuthSchemes

        private org.apache.http.auth.AuthSchemeRegistry supportedAuthSchemes
        Deprecated.
      • targetAuthStrategy

        private org.apache.http.client.AuthenticationStrategy targetAuthStrategy
        Deprecated.
      • proxyAuthStrategy

        private org.apache.http.client.AuthenticationStrategy proxyAuthStrategy
        Deprecated.
      • credsProvider

        private org.apache.http.client.CredentialsProvider credsProvider
        Deprecated.
      • routePlanner

        private org.apache.http.conn.routing.HttpRoutePlanner routePlanner
        Deprecated.
      • userTokenHandler

        private org.apache.http.client.UserTokenHandler userTokenHandler
        Deprecated.
      • params

        private org.apache.http.params.HttpParams params
        Deprecated.
      • terminated

        private volatile boolean terminated
        Deprecated.
    • Constructor Detail

      • AbstractHttpAsyncClient

        protected AbstractHttpAsyncClient​(org.apache.http.impl.nio.reactor.IOReactorConfig config)
                                   throws org.apache.http.nio.reactor.IOReactorException
        Deprecated.
        Throws:
        org.apache.http.nio.reactor.IOReactorException
    • Method Detail

      • createHttpParams

        protected abstract org.apache.http.params.HttpParams createHttpParams()
        Deprecated.
      • createHttpProcessor

        protected abstract org.apache.http.protocol.BasicHttpProcessor createHttpProcessor()
        Deprecated.
      • createHttpContext

        protected org.apache.http.protocol.HttpContext createHttpContext()
        Deprecated.
      • createConnectionReuseStrategy

        protected org.apache.http.ConnectionReuseStrategy createConnectionReuseStrategy()
        Deprecated.
      • createConnectionKeepAliveStrategy

        protected org.apache.http.conn.ConnectionKeepAliveStrategy createConnectionKeepAliveStrategy()
        Deprecated.
      • createAuthSchemeRegistry

        protected org.apache.http.auth.AuthSchemeRegistry createAuthSchemeRegistry()
        Deprecated.
      • createCookieSpecRegistry

        protected org.apache.http.cookie.CookieSpecRegistry createCookieSpecRegistry()
        Deprecated.
      • createTargetAuthenticationStrategy

        protected org.apache.http.client.AuthenticationStrategy createTargetAuthenticationStrategy()
        Deprecated.
      • createProxyAuthenticationStrategy

        protected org.apache.http.client.AuthenticationStrategy createProxyAuthenticationStrategy()
        Deprecated.
      • createCookieStore

        protected org.apache.http.client.CookieStore createCookieStore()
        Deprecated.
      • createCredentialsProvider

        protected org.apache.http.client.CredentialsProvider createCredentialsProvider()
        Deprecated.
      • createHttpRoutePlanner

        protected org.apache.http.conn.routing.HttpRoutePlanner createHttpRoutePlanner()
        Deprecated.
      • createUserTokenHandler

        protected org.apache.http.client.UserTokenHandler createUserTokenHandler()
        Deprecated.
      • getParams

        public final org.apache.http.params.HttpParams getParams()
        Deprecated.
      • setParams

        public void setParams​(org.apache.http.params.HttpParams params)
        Deprecated.
      • getConnectionReuseStrategy

        public final org.apache.http.ConnectionReuseStrategy getConnectionReuseStrategy()
        Deprecated.
      • setReuseStrategy

        public void setReuseStrategy​(org.apache.http.ConnectionReuseStrategy reuseStrategy)
        Deprecated.
      • getConnectionKeepAliveStrategy

        public final org.apache.http.conn.ConnectionKeepAliveStrategy getConnectionKeepAliveStrategy()
        Deprecated.
      • setKeepAliveStrategy

        public void setKeepAliveStrategy​(org.apache.http.conn.ConnectionKeepAliveStrategy keepAliveStrategy)
        Deprecated.
      • getRedirectStrategy

        public final org.apache.http.client.RedirectStrategy getRedirectStrategy()
        Deprecated.
      • setRedirectStrategy

        public void setRedirectStrategy​(org.apache.http.client.RedirectStrategy redirectStrategy)
        Deprecated.
      • getAuthSchemes

        public final org.apache.http.auth.AuthSchemeRegistry getAuthSchemes()
        Deprecated.
      • setAuthSchemes

        public void setAuthSchemes​(org.apache.http.auth.AuthSchemeRegistry authSchemeRegistry)
        Deprecated.
      • getCookieSpecs

        public final org.apache.http.cookie.CookieSpecRegistry getCookieSpecs()
        Deprecated.
      • setCookieSpecs

        public void setCookieSpecs​(org.apache.http.cookie.CookieSpecRegistry cookieSpecRegistry)
        Deprecated.
      • getTargetAuthenticationStrategy

        public final org.apache.http.client.AuthenticationStrategy getTargetAuthenticationStrategy()
        Deprecated.
      • setTargetAuthenticationStrategy

        public void setTargetAuthenticationStrategy​(org.apache.http.client.AuthenticationStrategy targetAuthStrategy)
        Deprecated.
      • getProxyAuthenticationStrategy

        public final org.apache.http.client.AuthenticationStrategy getProxyAuthenticationStrategy()
        Deprecated.
      • setProxyAuthenticationStrategy

        public void setProxyAuthenticationStrategy​(org.apache.http.client.AuthenticationStrategy proxyAuthStrategy)
        Deprecated.
      • getCookieStore

        public final org.apache.http.client.CookieStore getCookieStore()
        Deprecated.
      • setCookieStore

        public void setCookieStore​(org.apache.http.client.CookieStore cookieStore)
        Deprecated.
      • getCredentialsProvider

        public final org.apache.http.client.CredentialsProvider getCredentialsProvider()
        Deprecated.
      • setCredentialsProvider

        public void setCredentialsProvider​(org.apache.http.client.CredentialsProvider credsProvider)
        Deprecated.
      • getRoutePlanner

        public final org.apache.http.conn.routing.HttpRoutePlanner getRoutePlanner()
        Deprecated.
      • setRoutePlanner

        public void setRoutePlanner​(org.apache.http.conn.routing.HttpRoutePlanner routePlanner)
        Deprecated.
      • getUserTokenHandler

        public final org.apache.http.client.UserTokenHandler getUserTokenHandler()
        Deprecated.
      • setUserTokenHandler

        public void setUserTokenHandler​(org.apache.http.client.UserTokenHandler userTokenHandler)
        Deprecated.
      • getHttpProcessor

        protected final org.apache.http.protocol.BasicHttpProcessor getHttpProcessor()
        Deprecated.
      • getProtocolProcessor

        private final org.apache.http.protocol.HttpProcessor getProtocolProcessor()
        Deprecated.
      • getResponseInterceptorCount

        public int getResponseInterceptorCount()
        Deprecated.
      • getResponseInterceptor

        public org.apache.http.HttpResponseInterceptor getResponseInterceptor​(int index)
        Deprecated.
      • getRequestInterceptor

        public org.apache.http.HttpRequestInterceptor getRequestInterceptor​(int index)
        Deprecated.
      • getRequestInterceptorCount

        public int getRequestInterceptorCount()
        Deprecated.
      • addResponseInterceptor

        public void addResponseInterceptor​(org.apache.http.HttpResponseInterceptor itcp)
        Deprecated.
      • addResponseInterceptor

        public void addResponseInterceptor​(org.apache.http.HttpResponseInterceptor itcp,
                                           int index)
        Deprecated.
      • clearResponseInterceptors

        public void clearResponseInterceptors()
        Deprecated.
      • removeResponseInterceptorByClass

        public void removeResponseInterceptorByClass​(java.lang.Class<? extends org.apache.http.HttpResponseInterceptor> clazz)
        Deprecated.
      • addRequestInterceptor

        public void addRequestInterceptor​(org.apache.http.HttpRequestInterceptor itcp)
        Deprecated.
      • addRequestInterceptor

        public void addRequestInterceptor​(org.apache.http.HttpRequestInterceptor itcp,
                                          int index)
        Deprecated.
      • clearRequestInterceptors

        public void clearRequestInterceptors()
        Deprecated.
      • removeRequestInterceptorByClass

        public void removeRequestInterceptorByClass​(java.lang.Class<? extends org.apache.http.HttpRequestInterceptor> clazz)
        Deprecated.
      • doExecute

        private void doExecute()
        Deprecated.
      • getStatus

        public org.apache.http.nio.reactor.IOReactorStatus getStatus()
        Deprecated.
      • start

        public void start()
        Deprecated.
      • shutdown

        public void shutdown()
                      throws java.lang.InterruptedException
        Deprecated.
        Throws:
        java.lang.InterruptedException
      • execute

        public <T> java.util.concurrent.Future<T> execute​(org.apache.http.nio.protocol.HttpAsyncRequestProducer requestProducer,
                                                          org.apache.http.nio.protocol.HttpAsyncResponseConsumer<T> responseConsumer,
                                                          org.apache.http.protocol.HttpContext context,
                                                          org.apache.http.concurrent.FutureCallback<T> callback)
        Deprecated.
        Description copied from interface: HttpAsyncClient
        Initiates asynchronous HTTP request execution using the given context.

        The request producer passed to this method will be used to generate a request message and stream out its content without buffering it in memory. The response consumer passed to this method will be used to process a response message without buffering its content in memory.

        Please note it may be unsafe to interact with the context instance while the request is still being executed.

        Specified by:
        execute in interface HttpAsyncClient
        Type Parameters:
        T - the result type of request execution.
        Parameters:
        requestProducer - request producer callback.
        responseConsumer - response consumer callaback.
        context - HTTP context
        callback - future callback.
        Returns:
        future representing pending completion of the operation.
      • execute

        public <T> java.util.concurrent.Future<T> execute​(org.apache.http.nio.protocol.HttpAsyncRequestProducer requestProducer,
                                                          org.apache.http.nio.protocol.HttpAsyncResponseConsumer<T> responseConsumer,
                                                          org.apache.http.concurrent.FutureCallback<T> callback)
        Deprecated.
        Description copied from interface: HttpAsyncClient
        Initiates asynchronous HTTP request execution using the default context.

        The request producer passed to this method will be used to generate a request message and stream out its content without buffering it in memory. The response consumer passed to this method will be used to process a response message without buffering its content in memory.

        Specified by:
        execute in interface HttpAsyncClient
        Type Parameters:
        T - the result type of request execution.
        Parameters:
        requestProducer - request producer callback.
        responseConsumer - response consumer callaback.
        callback - future callback.
        Returns:
        future representing pending completion of the operation.
      • execute

        public java.util.concurrent.Future<org.apache.http.HttpResponse> execute​(org.apache.http.HttpHost target,
                                                                                 org.apache.http.HttpRequest request,
                                                                                 org.apache.http.protocol.HttpContext context,
                                                                                 org.apache.http.concurrent.FutureCallback<org.apache.http.HttpResponse> callback)
        Deprecated.
        Description copied from interface: HttpAsyncClient
        Initiates asynchronous HTTP request execution against the given target using the given context.

        Please note it may be unsafe to interact with the context instance while the request is still being executed.

        Specified by:
        execute in interface HttpAsyncClient
        Parameters:
        target - the target host for the request. Implementations may accept null if they can still determine a route, for example to a default target or by inspecting the request.
        request - the request to execute
        context - the context to use for the execution, or null to use the default context
        callback - future callback.
        Returns:
        future representing pending completion of the operation.
      • execute

        public java.util.concurrent.Future<org.apache.http.HttpResponse> execute​(org.apache.http.HttpHost target,
                                                                                 org.apache.http.HttpRequest request,
                                                                                 org.apache.http.concurrent.FutureCallback<org.apache.http.HttpResponse> callback)
        Deprecated.
        Description copied from interface: HttpAsyncClient
        Initiates asynchronous HTTP request execution against the given target.
        Specified by:
        execute in interface HttpAsyncClient
        Parameters:
        target - the target host for the request. Implementations may accept null if they can still determine a route, for example to a default target or by inspecting the request.
        request - the request to execute
        callback - future callback.
        Returns:
        future representing pending completion of the operation.
      • execute

        public java.util.concurrent.Future<org.apache.http.HttpResponse> execute​(org.apache.http.client.methods.HttpUriRequest request,
                                                                                 org.apache.http.concurrent.FutureCallback<org.apache.http.HttpResponse> callback)
        Deprecated.
        Description copied from interface: HttpAsyncClient
        Initiates asynchronous HTTP request execution.
        Specified by:
        execute in interface HttpAsyncClient
        Parameters:
        request - the request to execute
        callback - future callback.
        Returns:
        future representing pending completion of the operation.
      • execute

        public java.util.concurrent.Future<org.apache.http.HttpResponse> execute​(org.apache.http.client.methods.HttpUriRequest request,
                                                                                 org.apache.http.protocol.HttpContext context,
                                                                                 org.apache.http.concurrent.FutureCallback<org.apache.http.HttpResponse> callback)
        Deprecated.
        Description copied from interface: HttpAsyncClient
        Initiates asynchronous HTTP request execution using the given context.

        Please note it may be unsafe to interact with the context instance while the request is still being executed.

        Specified by:
        execute in interface HttpAsyncClient
        Parameters:
        request - the request to execute
        context - HTTP context
        callback - future callback.
        Returns:
        future representing pending completion of the operation.
      • determineTarget

        private org.apache.http.HttpHost determineTarget​(org.apache.http.client.methods.HttpUriRequest request)
                                                  throws org.apache.http.client.ClientProtocolException
        Deprecated.
        Throws:
        org.apache.http.client.ClientProtocolException