org.apache.http.impl.nio.client
Class AbstractHttpAsyncClient

java.lang.Object
  extended by org.apache.http.impl.nio.client.AbstractHttpAsyncClient
All Implemented Interfaces:
HttpAsyncClient
Direct Known Subclasses:
DefaultHttpAsyncClient

public abstract class AbstractHttpAsyncClient
extends Object
implements HttpAsyncClient


Constructor Summary
protected AbstractHttpAsyncClient(ClientAsyncConnectionManager connmgr)
           
protected AbstractHttpAsyncClient(org.apache.http.impl.nio.reactor.IOReactorConfig config)
           
 
Method Summary
 void addRequestInterceptor(org.apache.http.HttpRequestInterceptor itcp)
           
 void addRequestInterceptor(org.apache.http.HttpRequestInterceptor itcp, int index)
           
 void addResponseInterceptor(org.apache.http.HttpResponseInterceptor itcp)
           
 void addResponseInterceptor(org.apache.http.HttpResponseInterceptor itcp, int index)
           
 void clearRequestInterceptors()
           
 void clearResponseInterceptors()
           
protected  org.apache.http.auth.AuthSchemeRegistry createAuthSchemeRegistry()
           
protected  org.apache.http.conn.ConnectionKeepAliveStrategy createConnectionKeepAliveStrategy()
           
protected  org.apache.http.ConnectionReuseStrategy createConnectionReuseStrategy()
           
protected  org.apache.http.cookie.CookieSpecRegistry createCookieSpecRegistry()
           
protected  org.apache.http.client.CookieStore createCookieStore()
           
protected  org.apache.http.client.CredentialsProvider createCredentialsProvider()
           
protected  org.apache.http.protocol.HttpContext createHttpContext()
           
protected abstract  org.apache.http.params.HttpParams createHttpParams()
           
protected abstract  org.apache.http.protocol.BasicHttpProcessor createHttpProcessor()
           
protected  org.apache.http.conn.routing.HttpRoutePlanner createHttpRoutePlanner()
           
protected  org.apache.http.client.AuthenticationStrategy createProxyAuthenticationStrategy()
           
protected  org.apache.http.client.AuthenticationStrategy createTargetAuthenticationStrategy()
           
protected  org.apache.http.client.UserTokenHandler createUserTokenHandler()
           
<T> 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)
           
<T> 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)
           
 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)
           
 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)
           
 Future<org.apache.http.HttpResponse> execute(org.apache.http.client.methods.HttpUriRequest request, org.apache.http.concurrent.FutureCallback<org.apache.http.HttpResponse> callback)
           
 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)
           
 org.apache.http.auth.AuthSchemeRegistry getAuthSchemes()
           
 org.apache.http.conn.ConnectionKeepAliveStrategy getConnectionKeepAliveStrategy()
           
 ClientAsyncConnectionManager getConnectionManager()
           
 org.apache.http.ConnectionReuseStrategy getConnectionReuseStrategy()
           
 org.apache.http.cookie.CookieSpecRegistry getCookieSpecs()
           
 org.apache.http.client.CookieStore getCookieStore()
           
 org.apache.http.client.CredentialsProvider getCredentialsProvider()
           
protected  org.apache.http.protocol.BasicHttpProcessor getHttpProcessor()
           
 org.apache.http.params.HttpParams getParams()
           
 org.apache.http.client.AuthenticationStrategy getProxyAuthenticationStrategy()
           
 org.apache.http.client.RedirectStrategy getRedirectStrategy()
           
 org.apache.http.HttpRequestInterceptor getRequestInterceptor(int index)
           
 int getRequestInterceptorCount()
           
 org.apache.http.HttpResponseInterceptor getResponseInterceptor(int index)
           
 int getResponseInterceptorCount()
           
 org.apache.http.conn.routing.HttpRoutePlanner getRoutePlanner()
           
 org.apache.http.nio.reactor.IOReactorStatus getStatus()
           
 org.apache.http.client.AuthenticationStrategy getTargetAuthenticationStrategy()
           
 org.apache.http.client.UserTokenHandler getUserTokenHandler()
           
 void removeRequestInterceptorByClass(Class<? extends org.apache.http.HttpRequestInterceptor> clazz)
           
 void removeResponseInterceptorByClass(Class<? extends org.apache.http.HttpResponseInterceptor> clazz)
           
 void setAuthSchemes(org.apache.http.auth.AuthSchemeRegistry authSchemeRegistry)
           
 void setCookieSpecs(org.apache.http.cookie.CookieSpecRegistry cookieSpecRegistry)
           
 void setCookieStore(org.apache.http.client.CookieStore cookieStore)
           
 void setCredentialsProvider(org.apache.http.client.CredentialsProvider credsProvider)
           
 void setKeepAliveStrategy(org.apache.http.conn.ConnectionKeepAliveStrategy keepAliveStrategy)
           
 void setParams(org.apache.http.params.HttpParams params)
           
 void setProxyAuthenticationStrategy(org.apache.http.client.AuthenticationStrategy proxyAuthStrategy)
           
 void setRedirectStrategy(org.apache.http.client.RedirectStrategy redirectStrategy)
           
 void setReuseStrategy(org.apache.http.ConnectionReuseStrategy reuseStrategy)
           
 void setRoutePlanner(org.apache.http.conn.routing.HttpRoutePlanner routePlanner)
           
 void setTargetAuthenticationStrategy(org.apache.http.client.AuthenticationStrategy targetAuthStrategy)
           
 void setUserTokenHandler(org.apache.http.client.UserTokenHandler userTokenHandler)
           
 void shutdown()
           
 void start()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractHttpAsyncClient

protected AbstractHttpAsyncClient(ClientAsyncConnectionManager connmgr)

AbstractHttpAsyncClient

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

createHttpParams

protected abstract org.apache.http.params.HttpParams createHttpParams()

createHttpProcessor

protected abstract org.apache.http.protocol.BasicHttpProcessor createHttpProcessor()

createHttpContext

protected org.apache.http.protocol.HttpContext createHttpContext()

createConnectionReuseStrategy

protected org.apache.http.ConnectionReuseStrategy createConnectionReuseStrategy()

createConnectionKeepAliveStrategy

protected org.apache.http.conn.ConnectionKeepAliveStrategy createConnectionKeepAliveStrategy()

createAuthSchemeRegistry

protected org.apache.http.auth.AuthSchemeRegistry createAuthSchemeRegistry()

createCookieSpecRegistry

protected org.apache.http.cookie.CookieSpecRegistry createCookieSpecRegistry()

createTargetAuthenticationStrategy

protected org.apache.http.client.AuthenticationStrategy createTargetAuthenticationStrategy()

createProxyAuthenticationStrategy

protected org.apache.http.client.AuthenticationStrategy createProxyAuthenticationStrategy()

createCookieStore

protected org.apache.http.client.CookieStore createCookieStore()

createCredentialsProvider

protected org.apache.http.client.CredentialsProvider createCredentialsProvider()

createHttpRoutePlanner

protected org.apache.http.conn.routing.HttpRoutePlanner createHttpRoutePlanner()

createUserTokenHandler

protected org.apache.http.client.UserTokenHandler createUserTokenHandler()

getParams

public final org.apache.http.params.HttpParams getParams()
Specified by:
getParams in interface HttpAsyncClient

setParams

public void setParams(org.apache.http.params.HttpParams params)

getConnectionManager

public ClientAsyncConnectionManager getConnectionManager()
Specified by:
getConnectionManager in interface HttpAsyncClient

getConnectionReuseStrategy

public final org.apache.http.ConnectionReuseStrategy getConnectionReuseStrategy()

setReuseStrategy

public void setReuseStrategy(org.apache.http.ConnectionReuseStrategy reuseStrategy)

getConnectionKeepAliveStrategy

public final org.apache.http.conn.ConnectionKeepAliveStrategy getConnectionKeepAliveStrategy()

setKeepAliveStrategy

public void setKeepAliveStrategy(org.apache.http.conn.ConnectionKeepAliveStrategy keepAliveStrategy)

getRedirectStrategy

public final org.apache.http.client.RedirectStrategy getRedirectStrategy()

setRedirectStrategy

public void setRedirectStrategy(org.apache.http.client.RedirectStrategy redirectStrategy)

getAuthSchemes

public final org.apache.http.auth.AuthSchemeRegistry getAuthSchemes()

setAuthSchemes

public void setAuthSchemes(org.apache.http.auth.AuthSchemeRegistry authSchemeRegistry)

getCookieSpecs

public final org.apache.http.cookie.CookieSpecRegistry getCookieSpecs()

setCookieSpecs

public void setCookieSpecs(org.apache.http.cookie.CookieSpecRegistry cookieSpecRegistry)

getTargetAuthenticationStrategy

public final org.apache.http.client.AuthenticationStrategy getTargetAuthenticationStrategy()

setTargetAuthenticationStrategy

public void setTargetAuthenticationStrategy(org.apache.http.client.AuthenticationStrategy targetAuthStrategy)

getProxyAuthenticationStrategy

public final org.apache.http.client.AuthenticationStrategy getProxyAuthenticationStrategy()

setProxyAuthenticationStrategy

public void setProxyAuthenticationStrategy(org.apache.http.client.AuthenticationStrategy proxyAuthStrategy)

getCookieStore

public final org.apache.http.client.CookieStore getCookieStore()

setCookieStore

public void setCookieStore(org.apache.http.client.CookieStore cookieStore)

getCredentialsProvider

public final org.apache.http.client.CredentialsProvider getCredentialsProvider()

setCredentialsProvider

public void setCredentialsProvider(org.apache.http.client.CredentialsProvider credsProvider)

getRoutePlanner

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

setRoutePlanner

public void setRoutePlanner(org.apache.http.conn.routing.HttpRoutePlanner routePlanner)

getUserTokenHandler

public final org.apache.http.client.UserTokenHandler getUserTokenHandler()

setUserTokenHandler

public void setUserTokenHandler(org.apache.http.client.UserTokenHandler userTokenHandler)

getHttpProcessor

protected final org.apache.http.protocol.BasicHttpProcessor getHttpProcessor()

getResponseInterceptorCount

public int getResponseInterceptorCount()

getResponseInterceptor

public org.apache.http.HttpResponseInterceptor getResponseInterceptor(int index)

getRequestInterceptor

public org.apache.http.HttpRequestInterceptor getRequestInterceptor(int index)

getRequestInterceptorCount

public int getRequestInterceptorCount()

addResponseInterceptor

public void addResponseInterceptor(org.apache.http.HttpResponseInterceptor itcp)

addResponseInterceptor

public void addResponseInterceptor(org.apache.http.HttpResponseInterceptor itcp,
                                   int index)

clearResponseInterceptors

public void clearResponseInterceptors()

removeResponseInterceptorByClass

public void removeResponseInterceptorByClass(Class<? extends org.apache.http.HttpResponseInterceptor> clazz)

addRequestInterceptor

public void addRequestInterceptor(org.apache.http.HttpRequestInterceptor itcp)

addRequestInterceptor

public void addRequestInterceptor(org.apache.http.HttpRequestInterceptor itcp,
                                  int index)

clearRequestInterceptors

public void clearRequestInterceptors()

removeRequestInterceptorByClass

public void removeRequestInterceptorByClass(Class<? extends org.apache.http.HttpRequestInterceptor> clazz)

getStatus

public org.apache.http.nio.reactor.IOReactorStatus getStatus()
Specified by:
getStatus in interface HttpAsyncClient

start

public void start()
Specified by:
start in interface HttpAsyncClient

shutdown

public void shutdown()
              throws InterruptedException
Specified by:
shutdown in interface HttpAsyncClient
Throws:
InterruptedException

execute

public <T> 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)
Specified by:
execute in interface HttpAsyncClient

execute

public <T> 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)
Specified by:
execute in interface HttpAsyncClient

execute

public 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)
Specified by:
execute in interface HttpAsyncClient

execute

public 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)
Specified by:
execute in interface HttpAsyncClient

execute

public Future<org.apache.http.HttpResponse> execute(org.apache.http.client.methods.HttpUriRequest request,
                                                    org.apache.http.concurrent.FutureCallback<org.apache.http.HttpResponse> callback)
Specified by:
execute in interface HttpAsyncClient

execute

public 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)
Specified by:
execute in interface HttpAsyncClient


Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.