org.apache.http.impl.nio.client
Class AbstractHttpAsyncClient
java.lang.Object
org.apache.http.impl.nio.client.AbstractHttpAsyncClient
- All Implemented Interfaces:
- HttpAsyncClient
- Direct Known Subclasses:
- DefaultHttpAsyncClient
public abstract class AbstractHttpAsyncClient
- extends Object
- implements HttpAsyncClient
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 ConnectionKeepAliveStrategy |
createConnectionKeepAliveStrategy()
|
protected ConnectionReuseStrategy |
createConnectionReuseStrategy()
|
protected HttpContext |
createHttpContext()
|
protected abstract HttpParams |
createHttpParams()
|
protected abstract BasicHttpProcessor |
createHttpProcessor()
|
protected HttpRoutePlanner |
createHttpRoutePlanner()
|
|
execute(HttpAsyncRequestProducer requestProducer,
HttpAsyncResponseConsumer<T> responseConsumer,
FutureCallback<T> callback)
|
|
execute(HttpAsyncRequestProducer requestProducer,
HttpAsyncResponseConsumer<T> responseConsumer,
HttpContext context,
FutureCallback<T> callback)
|
Future<HttpResponse> |
execute(HttpHost target,
HttpRequest request,
FutureCallback<HttpResponse> callback)
|
Future<HttpResponse> |
execute(HttpHost target,
HttpRequest request,
HttpContext context,
FutureCallback<HttpResponse> callback)
|
Future<HttpResponse> |
execute(HttpUriRequest request,
FutureCallback<HttpResponse> callback)
|
Future<HttpResponse> |
execute(HttpUriRequest request,
HttpContext context,
FutureCallback<HttpResponse> callback)
|
ConnectionKeepAliveStrategy |
getConnectionKeepAliveStrategy()
|
ClientConnectionManager |
getConnectionManager()
|
ConnectionReuseStrategy |
getConnectionReuseStrategy()
|
protected BasicHttpProcessor |
getHttpProcessor()
|
HttpParams |
getParams()
|
RedirectStrategy |
getRedirectStrategy()
|
HttpRequestInterceptor |
getRequestInterceptor(int index)
|
int |
getRequestInterceptorCount()
|
HttpResponseInterceptor |
getResponseInterceptor(int index)
|
int |
getResponseInterceptorCount()
|
HttpRoutePlanner |
getRoutePlanner()
|
org.apache.http.nio.reactor.IOReactorStatus |
getStatus()
|
void |
removeRequestInterceptorByClass(Class<? extends HttpRequestInterceptor> clazz)
|
void |
removeResponseInterceptorByClass(Class<? extends HttpResponseInterceptor> clazz)
|
void |
setKeepAliveStrategy(ConnectionKeepAliveStrategy keepAliveStrategy)
|
void |
setRedirectStrategy(RedirectStrategy redirectStrategy)
|
void |
setReuseStrategy(ConnectionReuseStrategy reuseStrategy)
|
void |
setRoutePlanner(HttpRoutePlanner routePlanner)
|
void |
shutdown()
|
void |
start()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractHttpAsyncClient
protected AbstractHttpAsyncClient(org.apache.http.nio.reactor.ConnectingIOReactor ioReactor,
ClientConnectionManager connmgr,
HttpParams params)
AbstractHttpAsyncClient
protected AbstractHttpAsyncClient(HttpParams params)
throws org.apache.http.nio.reactor.IOReactorException
- Throws:
org.apache.http.nio.reactor.IOReactorException
createHttpParams
protected abstract HttpParams createHttpParams()
createHttpProcessor
protected abstract BasicHttpProcessor createHttpProcessor()
createHttpContext
protected HttpContext createHttpContext()
createConnectionReuseStrategy
protected ConnectionReuseStrategy createConnectionReuseStrategy()
createConnectionKeepAliveStrategy
protected ConnectionKeepAliveStrategy createConnectionKeepAliveStrategy()
createHttpRoutePlanner
protected HttpRoutePlanner createHttpRoutePlanner()
getParams
public final HttpParams getParams()
- Specified by:
getParams
in interface HttpAsyncClient
getConnectionManager
public ClientConnectionManager getConnectionManager()
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)
getRoutePlanner
public final HttpRoutePlanner getRoutePlanner()
setRoutePlanner
public void setRoutePlanner(HttpRoutePlanner routePlanner)
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(HttpAsyncRequestProducer requestProducer,
HttpAsyncResponseConsumer<T> responseConsumer,
HttpContext context,
FutureCallback<T> callback)
- Specified by:
execute
in interface HttpAsyncClient
execute
public <T> Future<T> execute(HttpAsyncRequestProducer requestProducer,
HttpAsyncResponseConsumer<T> responseConsumer,
FutureCallback<T> callback)
- Specified by:
execute
in interface HttpAsyncClient
execute
public Future<HttpResponse> execute(HttpHost target,
HttpRequest request,
HttpContext context,
FutureCallback<HttpResponse> callback)
- Specified by:
execute
in interface HttpAsyncClient
execute
public Future<HttpResponse> execute(HttpHost target,
HttpRequest request,
FutureCallback<HttpResponse> callback)
- Specified by:
execute
in interface HttpAsyncClient
execute
public Future<HttpResponse> execute(HttpUriRequest request,
FutureCallback<HttpResponse> callback)
- Specified by:
execute
in interface HttpAsyncClient
execute
public Future<HttpResponse> execute(HttpUriRequest request,
HttpContext context,
FutureCallback<HttpResponse> callback)
- Specified by:
execute
in interface HttpAsyncClient
Copyright © 2010-2011 The Apache Software Foundation. All Rights Reserved.