@Deprecated
class DefaultAsyncRequestDirector<T>
extends java.lang.Object
implements org.apache.http.nio.protocol.HttpAsyncRequestExecutionHandler<T>
Modifier and Type | Class and Description |
---|---|
(package private) class |
DefaultAsyncRequestDirector.InternalFutureCallback
Deprecated.
|
Modifier and Type | Field and Description |
---|---|
private org.apache.http.impl.client.HttpAuthenticator |
authenticator
Deprecated.
|
private org.apache.http.params.HttpParams |
clientParams
Deprecated.
|
private boolean |
closed
Deprecated.
|
private ClientAsyncConnectionManager |
connmgr
Deprecated.
|
private DefaultAsyncRequestDirector.InternalFutureCallback |
connRequestCallback
Deprecated.
|
private static java.util.concurrent.atomic.AtomicLong |
COUNTER
Deprecated.
|
private org.apache.http.impl.client.RequestWrapper |
currentRequest
Deprecated.
|
private org.apache.http.HttpResponse |
currentResponse
Deprecated.
|
private int |
execCount
Deprecated.
|
private org.apache.http.HttpResponse |
finalResponse
Deprecated.
|
private org.apache.http.impl.client.RoutedRequest |
followup
Deprecated.
|
private org.apache.http.protocol.HttpProcessor |
httppocessor
Deprecated.
|
private long |
id
Deprecated.
|
private org.apache.http.conn.ConnectionKeepAliveStrategy |
keepaliveStrategy
Deprecated.
|
private org.apache.http.protocol.HttpContext |
localContext
Deprecated.
|
private org.apache.commons.logging.Log |
log
Deprecated.
|
private org.apache.http.impl.client.RoutedRequest |
mainRequest
Deprecated.
|
private ManagedClientAsyncConnection |
managedConn
Deprecated.
|
private org.apache.http.impl.client.ClientParamsStack |
params
Deprecated.
|
private org.apache.http.auth.AuthState |
proxyAuthState
Deprecated.
|
private org.apache.http.client.AuthenticationStrategy |
proxyAuthStrategy
Deprecated.
|
private int |
redirectCount
Deprecated.
|
private org.apache.http.client.RedirectStrategy |
redirectStrategy
Deprecated.
|
private boolean |
requestContentProduced
Deprecated.
|
private org.apache.http.nio.protocol.HttpAsyncRequestProducer |
requestProducer
Deprecated.
|
private boolean |
requestSent
Deprecated.
|
private org.apache.http.nio.protocol.HttpAsyncResponseConsumer<T> |
responseConsumer
Deprecated.
|
private ResultCallback<T> |
resultCallback
Deprecated.
|
private org.apache.http.ConnectionReuseStrategy |
reuseStrategy
Deprecated.
|
private org.apache.http.conn.routing.HttpRouteDirector |
routeDirector
Deprecated.
|
private boolean |
routeEstablished
Deprecated.
|
private org.apache.http.conn.routing.HttpRoutePlanner |
routePlanner
Deprecated.
|
private org.apache.http.auth.AuthState |
targetAuthState
Deprecated.
|
private org.apache.http.client.AuthenticationStrategy |
targetAuthStrategy
Deprecated.
|
private java.nio.ByteBuffer |
tmpbuf
Deprecated.
|
private org.apache.http.client.UserTokenHandler |
userTokenHandler
Deprecated.
|
Constructor and 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.
|
Modifier and Type | Method and Description |
---|---|
boolean |
cancel()
Deprecated.
|
void |
close()
Deprecated.
|
private void |
connectionRequestCancelled()
Deprecated.
|
private void |
connectionRequestCompleted(ManagedClientAsyncConnection conn)
Deprecated.
|
private void |
connectionRequestFailed(java.lang.Exception ex)
Deprecated.
|
void |
consumeContent(org.apache.http.nio.ContentDecoder decoder,
org.apache.http.nio.IOControl ioctrl)
Deprecated.
|
private org.apache.http.HttpRequest |
createConnectRequest(org.apache.http.conn.routing.HttpRoute route)
Deprecated.
|
protected org.apache.http.conn.routing.HttpRoute |
determineRoute(org.apache.http.HttpHost target,
org.apache.http.HttpRequest request,
org.apache.http.protocol.HttpContext context)
Deprecated.
|
void |
endOfStream()
Deprecated.
|
void |
failed(java.lang.Exception ex)
Deprecated.
|
org.apache.http.HttpRequest |
generateRequest()
Deprecated.
|
org.apache.http.ConnectionReuseStrategy |
getConnectionReuseStrategy()
Deprecated.
|
org.apache.http.protocol.HttpContext |
getContext()
Deprecated.
|
java.lang.Exception |
getException()
Deprecated.
|
org.apache.http.protocol.HttpProcessor |
getHttpProcessor()
Deprecated.
|
T |
getResult()
Deprecated.
|
private AsyncSchemeRegistry |
getSchemeRegistry(org.apache.http.protocol.HttpContext context)
Deprecated.
|
org.apache.http.HttpHost |
getTarget()
Deprecated.
|
private org.apache.http.impl.client.RoutedRequest |
handleConnectResponse()
Deprecated.
|
private org.apache.http.impl.client.RoutedRequest |
handleProxyChallenge(org.apache.http.client.CredentialsProvider credsProvider)
Deprecated.
|
private org.apache.http.impl.client.RoutedRequest |
handleRedirect()
Deprecated.
|
private org.apache.http.impl.client.RoutedRequest |
handleResponse()
Deprecated.
|
private org.apache.http.impl.client.RoutedRequest |
handleTargetChallenge(org.apache.http.client.CredentialsProvider credsProvider)
Deprecated.
|
boolean |
isDone()
Deprecated.
|
boolean |
isRepeatable()
Deprecated.
|
void |
produceContent(org.apache.http.nio.ContentEncoder encoder,
org.apache.http.nio.IOControl ioctrl)
Deprecated.
|
private void |
releaseConnection()
Deprecated.
|
void |
requestCompleted(org.apache.http.protocol.HttpContext context)
Deprecated.
|
private void |
requestConnection()
Deprecated.
|
void |
resetRequest()
Deprecated.
|
void |
responseCompleted(org.apache.http.protocol.HttpContext context)
Deprecated.
|
void |
responseReceived(org.apache.http.HttpResponse response)
Deprecated.
|
protected void |
rewriteRequestURI(org.apache.http.impl.client.RequestWrapper request,
org.apache.http.conn.routing.HttpRoute route)
Deprecated.
|
void |
start()
Deprecated.
|
private org.apache.http.impl.client.RequestWrapper |
wrapRequest(org.apache.http.HttpRequest request)
Deprecated.
|
private static final java.util.concurrent.atomic.AtomicLong COUNTER
private final org.apache.commons.logging.Log log
private final org.apache.http.nio.protocol.HttpAsyncRequestProducer requestProducer
private final org.apache.http.nio.protocol.HttpAsyncResponseConsumer<T> responseConsumer
private final org.apache.http.protocol.HttpContext localContext
private final ResultCallback<T> resultCallback
private final ClientAsyncConnectionManager connmgr
private final org.apache.http.protocol.HttpProcessor httppocessor
private final org.apache.http.conn.routing.HttpRoutePlanner routePlanner
private final org.apache.http.conn.routing.HttpRouteDirector routeDirector
private final org.apache.http.ConnectionReuseStrategy reuseStrategy
private final org.apache.http.conn.ConnectionKeepAliveStrategy keepaliveStrategy
private final org.apache.http.client.RedirectStrategy redirectStrategy
private final org.apache.http.client.AuthenticationStrategy targetAuthStrategy
private final org.apache.http.client.AuthenticationStrategy proxyAuthStrategy
private final org.apache.http.client.UserTokenHandler userTokenHandler
private final org.apache.http.auth.AuthState targetAuthState
private final org.apache.http.auth.AuthState proxyAuthState
private final org.apache.http.impl.client.HttpAuthenticator authenticator
private final org.apache.http.params.HttpParams clientParams
private final long id
private volatile boolean closed
private volatile DefaultAsyncRequestDirector.InternalFutureCallback connRequestCallback
private volatile ManagedClientAsyncConnection managedConn
private org.apache.http.impl.client.RoutedRequest mainRequest
private org.apache.http.impl.client.RoutedRequest followup
private org.apache.http.HttpResponse finalResponse
private org.apache.http.impl.client.ClientParamsStack params
private org.apache.http.impl.client.RequestWrapper currentRequest
private org.apache.http.HttpResponse currentResponse
private boolean routeEstablished
private int redirectCount
private java.nio.ByteBuffer tmpbuf
private boolean requestContentProduced
private boolean requestSent
private int execCount
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)
public void close()
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
public void start()
public org.apache.http.HttpHost getTarget()
getTarget
in interface org.apache.http.nio.protocol.HttpAsyncRequestProducer
public org.apache.http.HttpRequest generateRequest() throws java.io.IOException, org.apache.http.HttpException
generateRequest
in interface org.apache.http.nio.protocol.HttpAsyncRequestProducer
java.io.IOException
org.apache.http.HttpException
public void produceContent(org.apache.http.nio.ContentEncoder encoder, org.apache.http.nio.IOControl ioctrl) throws java.io.IOException
produceContent
in interface org.apache.http.nio.protocol.HttpAsyncRequestProducer
java.io.IOException
public void requestCompleted(org.apache.http.protocol.HttpContext context)
requestCompleted
in interface org.apache.http.nio.protocol.HttpAsyncRequestProducer
public boolean isRepeatable()
isRepeatable
in interface org.apache.http.nio.protocol.HttpAsyncRequestProducer
public void resetRequest() throws java.io.IOException
resetRequest
in interface org.apache.http.nio.protocol.HttpAsyncRequestProducer
java.io.IOException
public void responseReceived(org.apache.http.HttpResponse response) throws java.io.IOException, org.apache.http.HttpException
responseReceived
in interface org.apache.http.nio.protocol.HttpAsyncResponseConsumer<T>
java.io.IOException
org.apache.http.HttpException
public void consumeContent(org.apache.http.nio.ContentDecoder decoder, org.apache.http.nio.IOControl ioctrl) throws java.io.IOException
consumeContent
in interface org.apache.http.nio.protocol.HttpAsyncResponseConsumer<T>
java.io.IOException
private void releaseConnection()
public void failed(java.lang.Exception ex)
failed
in interface org.apache.http.nio.protocol.HttpAsyncRequestProducer
failed
in interface org.apache.http.nio.protocol.HttpAsyncResponseConsumer<T>
public void responseCompleted(org.apache.http.protocol.HttpContext context)
responseCompleted
in interface org.apache.http.nio.protocol.HttpAsyncResponseConsumer<T>
public boolean cancel()
cancel
in interface org.apache.http.concurrent.Cancellable
public boolean isDone()
isDone
in interface org.apache.http.nio.protocol.HttpAsyncResponseConsumer<T>
public T getResult()
getResult
in interface org.apache.http.nio.protocol.HttpAsyncResponseConsumer<T>
public java.lang.Exception getException()
getException
in interface org.apache.http.nio.protocol.HttpAsyncResponseConsumer<T>
private void connectionRequestCompleted(ManagedClientAsyncConnection conn)
private void connectionRequestFailed(java.lang.Exception ex)
private void connectionRequestCancelled()
private void requestConnection()
public void endOfStream()
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.HttpException
org.apache.http.HttpException
private org.apache.http.impl.client.RequestWrapper wrapRequest(org.apache.http.HttpRequest request) throws org.apache.http.ProtocolException
org.apache.http.ProtocolException
protected void rewriteRequestURI(org.apache.http.impl.client.RequestWrapper request, org.apache.http.conn.routing.HttpRoute route) throws org.apache.http.ProtocolException
org.apache.http.ProtocolException
private AsyncSchemeRegistry getSchemeRegistry(org.apache.http.protocol.HttpContext context)
private org.apache.http.HttpRequest createConnectRequest(org.apache.http.conn.routing.HttpRoute route)
private org.apache.http.impl.client.RoutedRequest handleResponse() throws org.apache.http.HttpException
org.apache.http.HttpException
private org.apache.http.impl.client.RoutedRequest handleConnectResponse() throws org.apache.http.HttpException
org.apache.http.HttpException
private org.apache.http.impl.client.RoutedRequest handleRedirect() throws org.apache.http.HttpException
org.apache.http.HttpException
private org.apache.http.impl.client.RoutedRequest handleTargetChallenge(org.apache.http.client.CredentialsProvider credsProvider) throws org.apache.http.HttpException
org.apache.http.HttpException
private org.apache.http.impl.client.RoutedRequest handleProxyChallenge(org.apache.http.client.CredentialsProvider credsProvider) throws org.apache.http.HttpException
org.apache.http.HttpException
public org.apache.http.protocol.HttpContext getContext()
getContext
in interface org.apache.http.nio.protocol.HttpAsyncRequestExecutionHandler<T>
public org.apache.http.protocol.HttpProcessor getHttpProcessor()
getHttpProcessor
in interface org.apache.http.nio.protocol.HttpAsyncRequestExecutionHandler<T>
public org.apache.http.ConnectionReuseStrategy getConnectionReuseStrategy()
getConnectionReuseStrategy
in interface org.apache.http.nio.protocol.HttpAsyncRequestExecutionHandler<T>