Class AbstractHttpAsyncClient
- All Implemented Interfaces:
HttpAsyncClient
- Direct Known Subclasses:
DefaultHttpAsyncClient
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ClientAsyncConnectionManagerDeprecated.private org.apache.http.client.CookieStoreDeprecated.private org.apache.http.client.CredentialsProviderDeprecated.private org.apache.http.conn.ConnectionKeepAliveStrategyDeprecated.private final org.apache.commons.logging.LogDeprecated.private org.apache.http.protocol.BasicHttpProcessorDeprecated.private org.apache.http.params.HttpParamsDeprecated.private org.apache.http.protocol.ImmutableHttpProcessorDeprecated.private org.apache.http.client.AuthenticationStrategyDeprecated.private final Queue<org.apache.http.nio.protocol.HttpAsyncRequestExecutionHandler<?>> Deprecated.private ThreadDeprecated.private org.apache.http.client.RedirectStrategyDeprecated.private org.apache.http.ConnectionReuseStrategyDeprecated.private org.apache.http.conn.routing.HttpRoutePlannerDeprecated.private org.apache.http.auth.AuthSchemeRegistryDeprecated.private org.apache.http.cookie.CookieSpecRegistryDeprecated.private org.apache.http.client.AuthenticationStrategyDeprecated.private booleanDeprecated.private org.apache.http.client.UserTokenHandlerDeprecated. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractHttpAsyncClient(org.apache.http.impl.nio.reactor.IOReactorConfig config) Deprecated.protectedDeprecated. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddRequestInterceptor(org.apache.http.HttpRequestInterceptor itcp) Deprecated.voidaddRequestInterceptor(org.apache.http.HttpRequestInterceptor itcp, int index) Deprecated.voidaddResponseInterceptor(org.apache.http.HttpResponseInterceptor itcp) Deprecated.voidaddResponseInterceptor(org.apache.http.HttpResponseInterceptor itcp, int index) Deprecated.voidDeprecated.voidDeprecated.protected org.apache.http.auth.AuthSchemeRegistryDeprecated.protected org.apache.http.conn.ConnectionKeepAliveStrategyDeprecated.protected org.apache.http.ConnectionReuseStrategyDeprecated.protected org.apache.http.cookie.CookieSpecRegistryDeprecated.protected org.apache.http.client.CookieStoreDeprecated.protected org.apache.http.client.CredentialsProviderDeprecated.protected org.apache.http.protocol.HttpContextDeprecated.protected abstract org.apache.http.params.HttpParamsDeprecated.protected abstract org.apache.http.protocol.BasicHttpProcessorDeprecated.protected org.apache.http.conn.routing.HttpRoutePlannerDeprecated.protected org.apache.http.client.AuthenticationStrategyDeprecated.protected org.apache.http.client.AuthenticationStrategyDeprecated.protected org.apache.http.client.UserTokenHandlerDeprecated.private org.apache.http.HttpHostdetermineTarget(org.apache.http.client.methods.HttpUriRequest request) Deprecated.private voidDeprecated.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.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.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.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> 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> 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.final org.apache.http.auth.AuthSchemeRegistryDeprecated.final org.apache.http.conn.ConnectionKeepAliveStrategyDeprecated.Deprecated.final org.apache.http.ConnectionReuseStrategyDeprecated.final org.apache.http.cookie.CookieSpecRegistryDeprecated.final org.apache.http.client.CookieStoreDeprecated.final org.apache.http.client.CredentialsProviderDeprecated.protected final org.apache.http.protocol.BasicHttpProcessorDeprecated.final org.apache.http.params.HttpParamsDeprecated.private final org.apache.http.protocol.HttpProcessorDeprecated.final org.apache.http.client.AuthenticationStrategyDeprecated.final org.apache.http.client.RedirectStrategyDeprecated.org.apache.http.HttpRequestInterceptorgetRequestInterceptor(int index) Deprecated.intDeprecated.org.apache.http.HttpResponseInterceptorgetResponseInterceptor(int index) Deprecated.intDeprecated.final org.apache.http.conn.routing.HttpRoutePlannerDeprecated.org.apache.http.nio.reactor.IOReactorStatusDeprecated.final org.apache.http.client.AuthenticationStrategyDeprecated.final org.apache.http.client.UserTokenHandlerDeprecated.voidremoveRequestInterceptorByClass(Class<? extends org.apache.http.HttpRequestInterceptor> clazz) Deprecated.voidremoveResponseInterceptorByClass(Class<? extends org.apache.http.HttpResponseInterceptor> clazz) Deprecated.voidsetAuthSchemes(org.apache.http.auth.AuthSchemeRegistry authSchemeRegistry) Deprecated.voidsetCookieSpecs(org.apache.http.cookie.CookieSpecRegistry cookieSpecRegistry) Deprecated.voidsetCookieStore(org.apache.http.client.CookieStore cookieStore) Deprecated.voidsetCredentialsProvider(org.apache.http.client.CredentialsProvider credsProvider) Deprecated.voidsetKeepAliveStrategy(org.apache.http.conn.ConnectionKeepAliveStrategy keepAliveStrategy) Deprecated.voidsetParams(org.apache.http.params.HttpParams params) Deprecated.voidsetProxyAuthenticationStrategy(org.apache.http.client.AuthenticationStrategy proxyAuthStrategy) Deprecated.voidsetRedirectStrategy(org.apache.http.client.RedirectStrategy redirectStrategy) Deprecated.voidsetReuseStrategy(org.apache.http.ConnectionReuseStrategy reuseStrategy) Deprecated.voidsetRoutePlanner(org.apache.http.conn.routing.HttpRoutePlanner routePlanner) Deprecated.voidsetTargetAuthenticationStrategy(org.apache.http.client.AuthenticationStrategy targetAuthStrategy) Deprecated.voidsetUserTokenHandler(org.apache.http.client.UserTokenHandler userTokenHandler) Deprecated.voidshutdown()Deprecated.voidstart()Deprecated.
-
Field Details
-
log
private final org.apache.commons.logging.Log logDeprecated. -
connmgr
Deprecated. -
queue
Deprecated. -
reactorThread
Deprecated. -
mutableProcessor
private org.apache.http.protocol.BasicHttpProcessor mutableProcessorDeprecated. -
protocolProcessor
private org.apache.http.protocol.ImmutableHttpProcessor protocolProcessorDeprecated. -
reuseStrategy
private org.apache.http.ConnectionReuseStrategy reuseStrategyDeprecated. -
keepAliveStrategy
private org.apache.http.conn.ConnectionKeepAliveStrategy keepAliveStrategyDeprecated. -
redirectStrategy
private org.apache.http.client.RedirectStrategy redirectStrategyDeprecated. -
supportedCookieSpecs
private org.apache.http.cookie.CookieSpecRegistry supportedCookieSpecsDeprecated. -
cookieStore
private org.apache.http.client.CookieStore cookieStoreDeprecated. -
supportedAuthSchemes
private org.apache.http.auth.AuthSchemeRegistry supportedAuthSchemesDeprecated. -
targetAuthStrategy
private org.apache.http.client.AuthenticationStrategy targetAuthStrategyDeprecated. -
proxyAuthStrategy
private org.apache.http.client.AuthenticationStrategy proxyAuthStrategyDeprecated. -
credsProvider
private org.apache.http.client.CredentialsProvider credsProviderDeprecated. -
routePlanner
private org.apache.http.conn.routing.HttpRoutePlanner routePlannerDeprecated. -
userTokenHandler
private org.apache.http.client.UserTokenHandler userTokenHandlerDeprecated. -
params
private org.apache.http.params.HttpParams paramsDeprecated. -
terminated
private volatile boolean terminatedDeprecated.
-
-
Constructor Details
-
AbstractHttpAsyncClient
Deprecated. -
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 Details
-
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. -
getConnectionManager
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(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(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
-
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) Deprecated.Description copied from interface:HttpAsyncClientInitiates 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:
executein interfaceHttpAsyncClient- Type Parameters:
T- the result type of request execution.- Parameters:
requestProducer- request producer callback.responseConsumer- response consumer callaback.context- HTTP contextcallback- future callback.- Returns:
- future representing pending completion of the operation.
-
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) Deprecated.Description copied from interface:HttpAsyncClientInitiates 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:
executein interfaceHttpAsyncClient- 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 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:HttpAsyncClientInitiates 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:
executein interfaceHttpAsyncClient- Parameters:
target- the target host for the request. Implementations may acceptnullif 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, ornullto use the default contextcallback- future callback.- Returns:
- future representing pending completion of the operation.
-
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) Deprecated.Description copied from interface:HttpAsyncClientInitiates asynchronous HTTP request execution against the given target.- Specified by:
executein interfaceHttpAsyncClient- Parameters:
target- the target host for the request. Implementations may acceptnullif they can still determine a route, for example to a default target or by inspecting the request.request- the request to executecallback- future callback.- Returns:
- future representing pending completion of the operation.
-
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) Deprecated.Description copied from interface:HttpAsyncClientInitiates asynchronous HTTP request execution.- Specified by:
executein interfaceHttpAsyncClient- Parameters:
request- the request to executecallback- future callback.- Returns:
- future representing pending completion of the operation.
-
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) Deprecated.Description copied from interface:HttpAsyncClientInitiates 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:
executein interfaceHttpAsyncClient- Parameters:
request- the request to executecontext- HTTP contextcallback- 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
-