Package org.apache.http.impl.nio.client
Class DefaultAsyncRequestDirector<T>
- java.lang.Object
-
- org.apache.http.impl.nio.client.DefaultAsyncRequestDirector<T>
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,org.apache.http.concurrent.Cancellable,org.apache.http.nio.protocol.HttpAsyncRequestExecutionHandler<T>,org.apache.http.nio.protocol.HttpAsyncRequestProducer,org.apache.http.nio.protocol.HttpAsyncResponseConsumer<T>
@Deprecated class DefaultAsyncRequestDirector<T> extends java.lang.Object implements org.apache.http.nio.protocol.HttpAsyncRequestExecutionHandler<T>Deprecated.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) classDefaultAsyncRequestDirector.InternalFutureCallbackDeprecated.
-
Field Summary
Fields Modifier and Type Field Description private org.apache.http.impl.client.HttpAuthenticatorauthenticatorDeprecated.private org.apache.http.params.HttpParamsclientParamsDeprecated.private booleanclosedDeprecated.private ClientAsyncConnectionManagerconnmgrDeprecated.private DefaultAsyncRequestDirector.InternalFutureCallbackconnRequestCallbackDeprecated.private static java.util.concurrent.atomic.AtomicLongCOUNTERDeprecated.private org.apache.http.impl.client.RequestWrappercurrentRequestDeprecated.private org.apache.http.HttpResponsecurrentResponseDeprecated.private intexecCountDeprecated.private org.apache.http.HttpResponsefinalResponseDeprecated.private org.apache.http.impl.client.RoutedRequestfollowupDeprecated.private org.apache.http.protocol.HttpProcessorhttppocessorDeprecated.private longidDeprecated.private org.apache.http.conn.ConnectionKeepAliveStrategykeepaliveStrategyDeprecated.private org.apache.http.protocol.HttpContextlocalContextDeprecated.private org.apache.commons.logging.LoglogDeprecated.private org.apache.http.impl.client.RoutedRequestmainRequestDeprecated.private ManagedClientAsyncConnectionmanagedConnDeprecated.private org.apache.http.impl.client.ClientParamsStackparamsDeprecated.private org.apache.http.auth.AuthStateproxyAuthStateDeprecated.private org.apache.http.client.AuthenticationStrategyproxyAuthStrategyDeprecated.private intredirectCountDeprecated.private org.apache.http.client.RedirectStrategyredirectStrategyDeprecated.private booleanrequestContentProducedDeprecated.private org.apache.http.nio.protocol.HttpAsyncRequestProducerrequestProducerDeprecated.private booleanrequestSentDeprecated.private org.apache.http.nio.protocol.HttpAsyncResponseConsumer<T>responseConsumerDeprecated.private ResultCallback<T>resultCallbackDeprecated.private org.apache.http.ConnectionReuseStrategyreuseStrategyDeprecated.private org.apache.http.conn.routing.HttpRouteDirectorrouteDirectorDeprecated.private booleanrouteEstablishedDeprecated.private org.apache.http.conn.routing.HttpRoutePlannerroutePlannerDeprecated.private org.apache.http.auth.AuthStatetargetAuthStateDeprecated.private org.apache.http.client.AuthenticationStrategytargetAuthStrategyDeprecated.private java.nio.ByteBuffertmpbufDeprecated.private org.apache.http.client.UserTokenHandleruserTokenHandlerDeprecated.
-
Constructor Summary
Constructors Constructor Description DefaultAsyncRequestDirector(org.apache.commons.logging.Log log, org.apache.http.nio.protocol.HttpAsyncRequestProducer requestProducer, org.apache.http.nio.protocol.HttpAsyncResponseConsumer<T> responseConsumer, org.apache.http.protocol.HttpContext localContext, ResultCallback<T> callback, ClientAsyncConnectionManager connmgr, org.apache.http.protocol.HttpProcessor httppocessor, org.apache.http.conn.routing.HttpRoutePlanner routePlanner, org.apache.http.ConnectionReuseStrategy reuseStrategy, org.apache.http.conn.ConnectionKeepAliveStrategy keepaliveStrategy, org.apache.http.client.RedirectStrategy redirectStrategy, org.apache.http.client.AuthenticationStrategy targetAuthStrategy, org.apache.http.client.AuthenticationStrategy proxyAuthStrategy, org.apache.http.client.UserTokenHandler userTokenHandler, org.apache.http.params.HttpParams clientParams)Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleancancel()Deprecated.voidclose()Deprecated.private voidconnectionRequestCancelled()Deprecated.private voidconnectionRequestCompleted(ManagedClientAsyncConnection conn)Deprecated.private voidconnectionRequestFailed(java.lang.Exception ex)Deprecated.voidconsumeContent(org.apache.http.nio.ContentDecoder decoder, org.apache.http.nio.IOControl ioctrl)Deprecated.private org.apache.http.HttpRequestcreateConnectRequest(org.apache.http.conn.routing.HttpRoute route)Deprecated.protected org.apache.http.conn.routing.HttpRoutedetermineRoute(org.apache.http.HttpHost target, org.apache.http.HttpRequest request, org.apache.http.protocol.HttpContext context)Deprecated.voidendOfStream()Deprecated.voidfailed(java.lang.Exception ex)Deprecated.org.apache.http.HttpRequestgenerateRequest()Deprecated.org.apache.http.ConnectionReuseStrategygetConnectionReuseStrategy()Deprecated.org.apache.http.protocol.HttpContextgetContext()Deprecated.java.lang.ExceptiongetException()Deprecated.org.apache.http.protocol.HttpProcessorgetHttpProcessor()Deprecated.TgetResult()Deprecated.private AsyncSchemeRegistrygetSchemeRegistry(org.apache.http.protocol.HttpContext context)Deprecated.org.apache.http.HttpHostgetTarget()Deprecated.private org.apache.http.impl.client.RoutedRequesthandleConnectResponse()Deprecated.private org.apache.http.impl.client.RoutedRequesthandleProxyChallenge(org.apache.http.client.CredentialsProvider credsProvider)Deprecated.private org.apache.http.impl.client.RoutedRequesthandleRedirect()Deprecated.private org.apache.http.impl.client.RoutedRequesthandleResponse()Deprecated.private org.apache.http.impl.client.RoutedRequesthandleTargetChallenge(org.apache.http.client.CredentialsProvider credsProvider)Deprecated.booleanisDone()Deprecated.booleanisRepeatable()Deprecated.voidproduceContent(org.apache.http.nio.ContentEncoder encoder, org.apache.http.nio.IOControl ioctrl)Deprecated.private voidreleaseConnection()Deprecated.voidrequestCompleted(org.apache.http.protocol.HttpContext context)Deprecated.private voidrequestConnection()Deprecated.voidresetRequest()Deprecated.voidresponseCompleted(org.apache.http.protocol.HttpContext context)Deprecated.voidresponseReceived(org.apache.http.HttpResponse response)Deprecated.protected voidrewriteRequestURI(org.apache.http.impl.client.RequestWrapper request, org.apache.http.conn.routing.HttpRoute route)Deprecated.voidstart()Deprecated.private org.apache.http.impl.client.RequestWrapperwrapRequest(org.apache.http.HttpRequest request)Deprecated.
-
-
-
Field Detail
-
COUNTER
private static final java.util.concurrent.atomic.AtomicLong COUNTER
Deprecated.
-
log
private final org.apache.commons.logging.Log log
Deprecated.
-
requestProducer
private final org.apache.http.nio.protocol.HttpAsyncRequestProducer requestProducer
Deprecated.
-
responseConsumer
private final org.apache.http.nio.protocol.HttpAsyncResponseConsumer<T> responseConsumer
Deprecated.
-
localContext
private final org.apache.http.protocol.HttpContext localContext
Deprecated.
-
resultCallback
private final ResultCallback<T> resultCallback
Deprecated.
-
connmgr
private final ClientAsyncConnectionManager connmgr
Deprecated.
-
httppocessor
private final org.apache.http.protocol.HttpProcessor httppocessor
Deprecated.
-
routePlanner
private final org.apache.http.conn.routing.HttpRoutePlanner routePlanner
Deprecated.
-
routeDirector
private final org.apache.http.conn.routing.HttpRouteDirector routeDirector
Deprecated.
-
reuseStrategy
private final org.apache.http.ConnectionReuseStrategy reuseStrategy
Deprecated.
-
keepaliveStrategy
private final org.apache.http.conn.ConnectionKeepAliveStrategy keepaliveStrategy
Deprecated.
-
redirectStrategy
private final org.apache.http.client.RedirectStrategy redirectStrategy
Deprecated.
-
targetAuthStrategy
private final org.apache.http.client.AuthenticationStrategy targetAuthStrategy
Deprecated.
-
proxyAuthStrategy
private final org.apache.http.client.AuthenticationStrategy proxyAuthStrategy
Deprecated.
-
userTokenHandler
private final org.apache.http.client.UserTokenHandler userTokenHandler
Deprecated.
-
targetAuthState
private final org.apache.http.auth.AuthState targetAuthState
Deprecated.
-
proxyAuthState
private final org.apache.http.auth.AuthState proxyAuthState
Deprecated.
-
authenticator
private final org.apache.http.impl.client.HttpAuthenticator authenticator
Deprecated.
-
clientParams
private final org.apache.http.params.HttpParams clientParams
Deprecated.
-
id
private final long id
Deprecated.
-
closed
private volatile boolean closed
Deprecated.
-
connRequestCallback
private volatile DefaultAsyncRequestDirector.InternalFutureCallback connRequestCallback
Deprecated.
-
managedConn
private volatile ManagedClientAsyncConnection managedConn
Deprecated.
-
mainRequest
private org.apache.http.impl.client.RoutedRequest mainRequest
Deprecated.
-
followup
private org.apache.http.impl.client.RoutedRequest followup
Deprecated.
-
finalResponse
private org.apache.http.HttpResponse finalResponse
Deprecated.
-
params
private org.apache.http.impl.client.ClientParamsStack params
Deprecated.
-
currentRequest
private org.apache.http.impl.client.RequestWrapper currentRequest
Deprecated.
-
currentResponse
private org.apache.http.HttpResponse currentResponse
Deprecated.
-
routeEstablished
private boolean routeEstablished
Deprecated.
-
redirectCount
private int redirectCount
Deprecated.
-
tmpbuf
private java.nio.ByteBuffer tmpbuf
Deprecated.
-
requestContentProduced
private boolean requestContentProduced
Deprecated.
-
requestSent
private boolean requestSent
Deprecated.
-
execCount
private int execCount
Deprecated.
-
-
Constructor Detail
-
DefaultAsyncRequestDirector
public DefaultAsyncRequestDirector(org.apache.commons.logging.Log log, org.apache.http.nio.protocol.HttpAsyncRequestProducer requestProducer, org.apache.http.nio.protocol.HttpAsyncResponseConsumer<T> responseConsumer, org.apache.http.protocol.HttpContext localContext, ResultCallback<T> callback, ClientAsyncConnectionManager connmgr, org.apache.http.protocol.HttpProcessor httppocessor, org.apache.http.conn.routing.HttpRoutePlanner routePlanner, org.apache.http.ConnectionReuseStrategy reuseStrategy, org.apache.http.conn.ConnectionKeepAliveStrategy keepaliveStrategy, org.apache.http.client.RedirectStrategy redirectStrategy, org.apache.http.client.AuthenticationStrategy targetAuthStrategy, org.apache.http.client.AuthenticationStrategy proxyAuthStrategy, org.apache.http.client.UserTokenHandler userTokenHandler, org.apache.http.params.HttpParams clientParams)Deprecated.
-
-
Method Detail
-
close
public void close()
Deprecated.- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable
-
start
public void start()
Deprecated.
-
getTarget
public org.apache.http.HttpHost getTarget()
Deprecated.- Specified by:
getTargetin interfaceorg.apache.http.nio.protocol.HttpAsyncRequestProducer
-
generateRequest
public org.apache.http.HttpRequest generateRequest() throws java.io.IOException, org.apache.http.HttpExceptionDeprecated.- Specified by:
generateRequestin interfaceorg.apache.http.nio.protocol.HttpAsyncRequestProducer- Throws:
java.io.IOExceptionorg.apache.http.HttpException
-
produceContent
public void produceContent(org.apache.http.nio.ContentEncoder encoder, org.apache.http.nio.IOControl ioctrl) throws java.io.IOExceptionDeprecated.- Specified by:
produceContentin interfaceorg.apache.http.nio.protocol.HttpAsyncRequestProducer- Throws:
java.io.IOException
-
requestCompleted
public void requestCompleted(org.apache.http.protocol.HttpContext context)
Deprecated.- Specified by:
requestCompletedin interfaceorg.apache.http.nio.protocol.HttpAsyncRequestProducer
-
isRepeatable
public boolean isRepeatable()
Deprecated.- Specified by:
isRepeatablein interfaceorg.apache.http.nio.protocol.HttpAsyncRequestProducer
-
resetRequest
public void resetRequest() throws java.io.IOExceptionDeprecated.- Specified by:
resetRequestin interfaceorg.apache.http.nio.protocol.HttpAsyncRequestProducer- Throws:
java.io.IOException
-
responseReceived
public void responseReceived(org.apache.http.HttpResponse response) throws java.io.IOException, org.apache.http.HttpExceptionDeprecated.- Specified by:
responseReceivedin interfaceorg.apache.http.nio.protocol.HttpAsyncResponseConsumer<T>- Throws:
java.io.IOExceptionorg.apache.http.HttpException
-
consumeContent
public void consumeContent(org.apache.http.nio.ContentDecoder decoder, org.apache.http.nio.IOControl ioctrl) throws java.io.IOExceptionDeprecated.- Specified by:
consumeContentin interfaceorg.apache.http.nio.protocol.HttpAsyncResponseConsumer<T>- Throws:
java.io.IOException
-
releaseConnection
private void releaseConnection()
Deprecated.
-
failed
public void failed(java.lang.Exception ex)
Deprecated.- Specified by:
failedin interfaceorg.apache.http.nio.protocol.HttpAsyncRequestProducer- Specified by:
failedin interfaceorg.apache.http.nio.protocol.HttpAsyncResponseConsumer<T>
-
responseCompleted
public void responseCompleted(org.apache.http.protocol.HttpContext context)
Deprecated.- Specified by:
responseCompletedin interfaceorg.apache.http.nio.protocol.HttpAsyncResponseConsumer<T>
-
cancel
public boolean cancel()
Deprecated.- Specified by:
cancelin interfaceorg.apache.http.concurrent.Cancellable
-
isDone
public boolean isDone()
Deprecated.- Specified by:
isDonein interfaceorg.apache.http.nio.protocol.HttpAsyncResponseConsumer<T>
-
getResult
public T getResult()
Deprecated.- Specified by:
getResultin interfaceorg.apache.http.nio.protocol.HttpAsyncResponseConsumer<T>
-
getException
public java.lang.Exception getException()
Deprecated.- Specified by:
getExceptionin interfaceorg.apache.http.nio.protocol.HttpAsyncResponseConsumer<T>
-
connectionRequestCompleted
private void connectionRequestCompleted(ManagedClientAsyncConnection conn)
Deprecated.
-
connectionRequestFailed
private void connectionRequestFailed(java.lang.Exception ex)
Deprecated.
-
connectionRequestCancelled
private void connectionRequestCancelled()
Deprecated.
-
requestConnection
private void requestConnection()
Deprecated.
-
endOfStream
public void endOfStream()
Deprecated.
-
determineRoute
protected org.apache.http.conn.routing.HttpRoute determineRoute(org.apache.http.HttpHost target, org.apache.http.HttpRequest request, org.apache.http.protocol.HttpContext context) throws org.apache.http.HttpExceptionDeprecated.- Throws:
org.apache.http.HttpException
-
wrapRequest
private org.apache.http.impl.client.RequestWrapper wrapRequest(org.apache.http.HttpRequest request) throws org.apache.http.ProtocolExceptionDeprecated.- Throws:
org.apache.http.ProtocolException
-
rewriteRequestURI
protected void rewriteRequestURI(org.apache.http.impl.client.RequestWrapper request, org.apache.http.conn.routing.HttpRoute route) throws org.apache.http.ProtocolExceptionDeprecated.- Throws:
org.apache.http.ProtocolException
-
getSchemeRegistry
private AsyncSchemeRegistry getSchemeRegistry(org.apache.http.protocol.HttpContext context)
Deprecated.
-
createConnectRequest
private org.apache.http.HttpRequest createConnectRequest(org.apache.http.conn.routing.HttpRoute route)
Deprecated.
-
handleResponse
private org.apache.http.impl.client.RoutedRequest handleResponse() throws org.apache.http.HttpExceptionDeprecated.- Throws:
org.apache.http.HttpException
-
handleConnectResponse
private org.apache.http.impl.client.RoutedRequest handleConnectResponse() throws org.apache.http.HttpExceptionDeprecated.- Throws:
org.apache.http.HttpException
-
handleRedirect
private org.apache.http.impl.client.RoutedRequest handleRedirect() throws org.apache.http.HttpExceptionDeprecated.- Throws:
org.apache.http.HttpException
-
handleTargetChallenge
private org.apache.http.impl.client.RoutedRequest handleTargetChallenge(org.apache.http.client.CredentialsProvider credsProvider) throws org.apache.http.HttpExceptionDeprecated.- Throws:
org.apache.http.HttpException
-
handleProxyChallenge
private org.apache.http.impl.client.RoutedRequest handleProxyChallenge(org.apache.http.client.CredentialsProvider credsProvider) throws org.apache.http.HttpExceptionDeprecated.- Throws:
org.apache.http.HttpException
-
getContext
public org.apache.http.protocol.HttpContext getContext()
Deprecated.- Specified by:
getContextin interfaceorg.apache.http.nio.protocol.HttpAsyncRequestExecutionHandler<T>
-
getHttpProcessor
public org.apache.http.protocol.HttpProcessor getHttpProcessor()
Deprecated.- Specified by:
getHttpProcessorin interfaceorg.apache.http.nio.protocol.HttpAsyncRequestExecutionHandler<T>
-
getConnectionReuseStrategy
public org.apache.http.ConnectionReuseStrategy getConnectionReuseStrategy()
Deprecated.- Specified by:
getConnectionReuseStrategyin interfaceorg.apache.http.nio.protocol.HttpAsyncRequestExecutionHandler<T>
-
-