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(HttpRequestInterceptor itcp)
           
 void addRequestInterceptor(HttpRequestInterceptor itcp, int index)
           
 void addResponseInterceptor(HttpResponseInterceptor itcp)
           
 void addResponseInterceptor(HttpResponseInterceptor itcp, int index)
           
 void clearRequestInterceptors()
           
 void clearResponseInterceptors()
           
protected  AuthSchemeRegistry createAuthSchemeRegistry()
           
protected  ConnectionKeepAliveStrategy createConnectionKeepAliveStrategy()
           
protected  ConnectionReuseStrategy createConnectionReuseStrategy()
           
protected  CookieSpecRegistry createCookieSpecRegistry()
           
protected  CookieStore createCookieStore()
           
protected  CredentialsProvider createCredentialsProvider()
           
protected  HttpContext createHttpContext()
           
protected abstract  HttpParams createHttpParams()
           
protected abstract  BasicHttpProcessor createHttpProcessor()
           
protected  HttpRoutePlanner createHttpRoutePlanner()
           
protected  AuthenticationHandler createProxyAuthenticationHandler()
           
protected  AuthenticationHandler createTargetAuthenticationHandler()
           
protected  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, HttpContext context, org.apache.http.concurrent.FutureCallback<T> callback)
           
 Future<HttpResponse> execute(HttpHost target, HttpRequest request, org.apache.http.concurrent.FutureCallback<HttpResponse> callback)
           
 Future<HttpResponse> execute(HttpHost target, HttpRequest request, HttpContext context, org.apache.http.concurrent.FutureCallback<HttpResponse> callback)
           
 Future<HttpResponse> execute(HttpUriRequest request, org.apache.http.concurrent.FutureCallback<HttpResponse> callback)
           
 Future<HttpResponse> execute(HttpUriRequest request, HttpContext context, org.apache.http.concurrent.FutureCallback<HttpResponse> callback)
           
 AuthSchemeRegistry getAuthSchemes()
           
 ConnectionKeepAliveStrategy getConnectionKeepAliveStrategy()
           
 ClientAsyncConnectionManager getConnectionManager()
           
 ConnectionReuseStrategy getConnectionReuseStrategy()
           
 CookieSpecRegistry getCookieSpecs()
           
 CookieStore getCookieStore()
           
 CredentialsProvider getCredentialsProvider()
           
protected  BasicHttpProcessor getHttpProcessor()
           
 HttpParams getParams()
           
 AuthenticationHandler getProxyAuthenticationHandler()
           
 RedirectStrategy getRedirectStrategy()
           
 HttpRequestInterceptor getRequestInterceptor(int index)
           
 int getRequestInterceptorCount()
           
 HttpResponseInterceptor getResponseInterceptor(int index)
           
 int getResponseInterceptorCount()
           
 HttpRoutePlanner getRoutePlanner()
           
 org.apache.http.nio.reactor.IOReactorStatus getStatus()
           
 AuthenticationHandler getTargetAuthenticationHandler()
           
 UserTokenHandler getUserTokenHandler()
           
 void removeRequestInterceptorByClass(Class<? extends HttpRequestInterceptor> clazz)
           
 void removeResponseInterceptorByClass(Class<? extends HttpResponseInterceptor> clazz)
           
 void setAuthSchemes(AuthSchemeRegistry authSchemeRegistry)
           
 void setCookieSpecs(CookieSpecRegistry cookieSpecRegistry)
           
 void setCookieStore(CookieStore cookieStore)
           
 void setCredentialsProvider(CredentialsProvider credsProvider)
           
 void setKeepAliveStrategy(ConnectionKeepAliveStrategy keepAliveStrategy)
           
 void setParams(HttpParams params)
           
 void setProxyAuthenticationHandler(AuthenticationHandler proxyAuthHandler)
           
 void setRedirectStrategy(RedirectStrategy redirectStrategy)
           
 void setReuseStrategy(ConnectionReuseStrategy reuseStrategy)
           
 void setRoutePlanner(HttpRoutePlanner routePlanner)
           
 void setTargetAuthenticationHandler(AuthenticationHandler targetAuthHandler)
           
 void setUserTokenHandler(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 HttpParams createHttpParams()

createHttpProcessor

protected abstract BasicHttpProcessor createHttpProcessor()

createHttpContext

protected HttpContext createHttpContext()

createConnectionReuseStrategy

protected ConnectionReuseStrategy createConnectionReuseStrategy()

createConnectionKeepAliveStrategy

protected ConnectionKeepAliveStrategy createConnectionKeepAliveStrategy()

createAuthSchemeRegistry

protected AuthSchemeRegistry createAuthSchemeRegistry()

createCookieSpecRegistry

protected CookieSpecRegistry createCookieSpecRegistry()

createTargetAuthenticationHandler

protected AuthenticationHandler createTargetAuthenticationHandler()

createProxyAuthenticationHandler

protected AuthenticationHandler createProxyAuthenticationHandler()

createCookieStore

protected CookieStore createCookieStore()

createCredentialsProvider

protected CredentialsProvider createCredentialsProvider()

createHttpRoutePlanner

protected HttpRoutePlanner createHttpRoutePlanner()

createUserTokenHandler

protected UserTokenHandler createUserTokenHandler()

getParams

public final HttpParams getParams()
Specified by:
getParams in interface HttpAsyncClient

setParams

public void setParams(HttpParams params)

getConnectionManager

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

getConnectionReuseStrategy

public final ConnectionReuseStrategy getConnectionReuseStrategy()

setReuseStrategy

public void setReuseStrategy(ConnectionReuseStrategy reuseStrategy)

getConnectionKeepAliveStrategy

public final ConnectionKeepAliveStrategy getConnectionKeepAliveStrategy()

setKeepAliveStrategy

public void setKeepAliveStrategy(ConnectionKeepAliveStrategy keepAliveStrategy)

getRedirectStrategy

public final RedirectStrategy getRedirectStrategy()

setRedirectStrategy

public void setRedirectStrategy(RedirectStrategy redirectStrategy)

getAuthSchemes

public final AuthSchemeRegistry getAuthSchemes()

setAuthSchemes

public void setAuthSchemes(AuthSchemeRegistry authSchemeRegistry)

getCookieSpecs

public final CookieSpecRegistry getCookieSpecs()

setCookieSpecs

public void setCookieSpecs(CookieSpecRegistry cookieSpecRegistry)

getTargetAuthenticationHandler

public final AuthenticationHandler getTargetAuthenticationHandler()

setTargetAuthenticationHandler

public void setTargetAuthenticationHandler(AuthenticationHandler targetAuthHandler)

getProxyAuthenticationHandler

public final AuthenticationHandler getProxyAuthenticationHandler()

setProxyAuthenticationHandler

public void setProxyAuthenticationHandler(AuthenticationHandler proxyAuthHandler)

getCookieStore

public final CookieStore getCookieStore()

setCookieStore

public void setCookieStore(CookieStore cookieStore)

getCredentialsProvider

public final CredentialsProvider getCredentialsProvider()

setCredentialsProvider

public void setCredentialsProvider(CredentialsProvider credsProvider)

getRoutePlanner

public final HttpRoutePlanner getRoutePlanner()

setRoutePlanner

public void setRoutePlanner(HttpRoutePlanner routePlanner)

getUserTokenHandler

public final UserTokenHandler getUserTokenHandler()

setUserTokenHandler

public void setUserTokenHandler(UserTokenHandler userTokenHandler)

getHttpProcessor

protected final BasicHttpProcessor getHttpProcessor()

getResponseInterceptorCount

public int getResponseInterceptorCount()

getResponseInterceptor

public HttpResponseInterceptor getResponseInterceptor(int index)

getRequestInterceptor

public HttpRequestInterceptor getRequestInterceptor(int index)

getRequestInterceptorCount

public int getRequestInterceptorCount()

addResponseInterceptor

public void addResponseInterceptor(HttpResponseInterceptor itcp)

addResponseInterceptor

public void addResponseInterceptor(HttpResponseInterceptor itcp,
                                   int index)

clearResponseInterceptors

public void clearResponseInterceptors()

removeResponseInterceptorByClass

public void removeResponseInterceptorByClass(Class<? extends HttpResponseInterceptor> clazz)

addRequestInterceptor

public void addRequestInterceptor(HttpRequestInterceptor itcp)

addRequestInterceptor

public void addRequestInterceptor(HttpRequestInterceptor itcp,
                                  int index)

clearRequestInterceptors

public void clearRequestInterceptors()

removeRequestInterceptorByClass

public void removeRequestInterceptorByClass(Class<? extends 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,
                             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<HttpResponse> execute(HttpHost target,
                                    HttpRequest request,
                                    HttpContext context,
                                    org.apache.http.concurrent.FutureCallback<HttpResponse> callback)
Specified by:
execute in interface HttpAsyncClient

execute

public Future<HttpResponse> execute(HttpHost target,
                                    HttpRequest request,
                                    org.apache.http.concurrent.FutureCallback<HttpResponse> callback)
Specified by:
execute in interface HttpAsyncClient

execute

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

execute

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


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