@Deprecated public abstract class AbstractHttpAsyncClient extends java.lang.Object implements HttpAsyncClient
Modifier and Type | Field and 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.
|
Modifier | Constructor and Description |
---|---|
protected |
AbstractHttpAsyncClient(ClientAsyncConnectionManager connmgr)
Deprecated.
|
protected |
AbstractHttpAsyncClient(org.apache.http.impl.nio.reactor.IOReactorConfig config)
Deprecated.
|
Modifier and Type | Method and 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.
|
<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.
|
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.
|
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.
|
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.
|
private final org.apache.commons.logging.Log log
private final ClientAsyncConnectionManager connmgr
private final java.util.Queue<org.apache.http.nio.protocol.HttpAsyncRequestExecutionHandler<?>> queue
private java.lang.Thread reactorThread
private org.apache.http.protocol.BasicHttpProcessor mutableProcessor
private org.apache.http.protocol.ImmutableHttpProcessor protocolProcessor
private org.apache.http.ConnectionReuseStrategy reuseStrategy
private org.apache.http.conn.ConnectionKeepAliveStrategy keepAliveStrategy
private org.apache.http.client.RedirectStrategy redirectStrategy
private org.apache.http.cookie.CookieSpecRegistry supportedCookieSpecs
private org.apache.http.client.CookieStore cookieStore
private org.apache.http.auth.AuthSchemeRegistry supportedAuthSchemes
private org.apache.http.client.AuthenticationStrategy targetAuthStrategy
private org.apache.http.client.AuthenticationStrategy proxyAuthStrategy
private org.apache.http.client.CredentialsProvider credsProvider
private org.apache.http.conn.routing.HttpRoutePlanner routePlanner
private org.apache.http.client.UserTokenHandler userTokenHandler
private org.apache.http.params.HttpParams params
private volatile boolean terminated
protected AbstractHttpAsyncClient(ClientAsyncConnectionManager connmgr)
protected AbstractHttpAsyncClient(org.apache.http.impl.nio.reactor.IOReactorConfig config) throws org.apache.http.nio.reactor.IOReactorException
org.apache.http.nio.reactor.IOReactorException
protected abstract org.apache.http.params.HttpParams createHttpParams()
protected abstract org.apache.http.protocol.BasicHttpProcessor createHttpProcessor()
protected org.apache.http.protocol.HttpContext createHttpContext()
protected org.apache.http.ConnectionReuseStrategy createConnectionReuseStrategy()
protected org.apache.http.conn.ConnectionKeepAliveStrategy createConnectionKeepAliveStrategy()
protected org.apache.http.auth.AuthSchemeRegistry createAuthSchemeRegistry()
protected org.apache.http.cookie.CookieSpecRegistry createCookieSpecRegistry()
protected org.apache.http.client.AuthenticationStrategy createTargetAuthenticationStrategy()
protected org.apache.http.client.AuthenticationStrategy createProxyAuthenticationStrategy()
protected org.apache.http.client.CookieStore createCookieStore()
protected org.apache.http.client.CredentialsProvider createCredentialsProvider()
protected org.apache.http.conn.routing.HttpRoutePlanner createHttpRoutePlanner()
protected org.apache.http.client.UserTokenHandler createUserTokenHandler()
public final org.apache.http.params.HttpParams getParams()
public void setParams(org.apache.http.params.HttpParams params)
public ClientAsyncConnectionManager getConnectionManager()
public final org.apache.http.ConnectionReuseStrategy getConnectionReuseStrategy()
public void setReuseStrategy(org.apache.http.ConnectionReuseStrategy reuseStrategy)
public final org.apache.http.conn.ConnectionKeepAliveStrategy getConnectionKeepAliveStrategy()
public void setKeepAliveStrategy(org.apache.http.conn.ConnectionKeepAliveStrategy keepAliveStrategy)
public final org.apache.http.client.RedirectStrategy getRedirectStrategy()
public void setRedirectStrategy(org.apache.http.client.RedirectStrategy redirectStrategy)
public final org.apache.http.auth.AuthSchemeRegistry getAuthSchemes()
public void setAuthSchemes(org.apache.http.auth.AuthSchemeRegistry authSchemeRegistry)
public final org.apache.http.cookie.CookieSpecRegistry getCookieSpecs()
public void setCookieSpecs(org.apache.http.cookie.CookieSpecRegistry cookieSpecRegistry)
public final org.apache.http.client.AuthenticationStrategy getTargetAuthenticationStrategy()
public void setTargetAuthenticationStrategy(org.apache.http.client.AuthenticationStrategy targetAuthStrategy)
public final org.apache.http.client.AuthenticationStrategy getProxyAuthenticationStrategy()
public void setProxyAuthenticationStrategy(org.apache.http.client.AuthenticationStrategy proxyAuthStrategy)
public final org.apache.http.client.CookieStore getCookieStore()
public void setCookieStore(org.apache.http.client.CookieStore cookieStore)
public final org.apache.http.client.CredentialsProvider getCredentialsProvider()
public void setCredentialsProvider(org.apache.http.client.CredentialsProvider credsProvider)
public final org.apache.http.conn.routing.HttpRoutePlanner getRoutePlanner()
public void setRoutePlanner(org.apache.http.conn.routing.HttpRoutePlanner routePlanner)
public final org.apache.http.client.UserTokenHandler getUserTokenHandler()
public void setUserTokenHandler(org.apache.http.client.UserTokenHandler userTokenHandler)
protected final org.apache.http.protocol.BasicHttpProcessor getHttpProcessor()
private final org.apache.http.protocol.HttpProcessor getProtocolProcessor()
public int getResponseInterceptorCount()
public org.apache.http.HttpResponseInterceptor getResponseInterceptor(int index)
public org.apache.http.HttpRequestInterceptor getRequestInterceptor(int index)
public int getRequestInterceptorCount()
public void addResponseInterceptor(org.apache.http.HttpResponseInterceptor itcp)
public void addResponseInterceptor(org.apache.http.HttpResponseInterceptor itcp, int index)
public void clearResponseInterceptors()
public void removeResponseInterceptorByClass(java.lang.Class<? extends org.apache.http.HttpResponseInterceptor> clazz)
public void addRequestInterceptor(org.apache.http.HttpRequestInterceptor itcp)
public void addRequestInterceptor(org.apache.http.HttpRequestInterceptor itcp, int index)
public void clearRequestInterceptors()
public void removeRequestInterceptorByClass(java.lang.Class<? extends org.apache.http.HttpRequestInterceptor> clazz)
private void doExecute()
public org.apache.http.nio.reactor.IOReactorStatus getStatus()
public void start()
public void shutdown() throws java.lang.InterruptedException
java.lang.InterruptedException
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)
HttpAsyncClient
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.
execute
in interface HttpAsyncClient
T
- the result type of request execution.requestProducer
- request producer callback.responseConsumer
- response consumer callaback.context
- HTTP contextcallback
- future callback.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)
HttpAsyncClient
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.
execute
in interface HttpAsyncClient
T
- the result type of request execution.requestProducer
- request producer callback.responseConsumer
- response consumer callaback.callback
- future callback.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)
HttpAsyncClient
Please note it may be unsafe to interact with the context instance while the request is still being executed.
execute
in interface HttpAsyncClient
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 executecontext
- the context to use for the execution, or
null
to use the default contextcallback
- future callback.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)
HttpAsyncClient
execute
in interface HttpAsyncClient
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 executecallback
- future callback.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)
HttpAsyncClient
execute
in interface HttpAsyncClient
request
- the request to executecallback
- future callback.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)
HttpAsyncClient
Please note it may be unsafe to interact with the context instance while the request is still being executed.
execute
in interface HttpAsyncClient
request
- the request to executecontext
- HTTP contextcallback
- future callback.private org.apache.http.HttpHost determineTarget(org.apache.http.client.methods.HttpUriRequest request) throws org.apache.http.client.ClientProtocolException
org.apache.http.client.ClientProtocolException