Package org.apache.http.impl.nio.client
Class MainClientExec
- java.lang.Object
-
- org.apache.http.impl.nio.client.MainClientExec
-
- All Implemented Interfaces:
InternalClientExec
class MainClientExec extends java.lang.Object implements InternalClientExec
-
-
Field Summary
Fields Modifier and Type Field Description private org.apache.http.impl.auth.HttpAuthenticatorauthenticatorprivate org.apache.http.protocol.HttpProcessorhttpProcessorprivate org.apache.commons.logging.Loglogprivate org.apache.http.client.AuthenticationStrategyproxyAuthStrategyprivate org.apache.http.protocol.HttpProcessorproxyHttpProcessorprivate org.apache.http.client.RedirectStrategyredirectStrategyprivate org.apache.http.conn.routing.HttpRouteDirectorrouteDirectorprivate org.apache.http.conn.routing.HttpRoutePlannerroutePlannerprivate org.apache.http.client.AuthenticationStrategytargetAuthStrategyprivate org.apache.http.client.UserTokenHandleruserTokenHandler
-
Constructor Summary
Constructors Constructor Description MainClientExec(org.apache.http.protocol.HttpProcessor httpProcessor, org.apache.http.conn.routing.HttpRoutePlanner routePlanner, org.apache.http.client.RedirectStrategy redirectStrategy, org.apache.http.client.AuthenticationStrategy targetAuthStrategy, org.apache.http.client.AuthenticationStrategy proxyAuthStrategy, org.apache.http.client.UserTokenHandler userTokenHandler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconsumeContent(InternalState state, org.apache.http.nio.ContentDecoder decoder, org.apache.http.nio.IOControl ioctrl)private org.apache.http.HttpRequestcreateConnectRequest(org.apache.http.conn.routing.HttpRoute route, InternalState state)org.apache.http.HttpRequestgenerateRequest(InternalState state, AbstractClientExchangeHandler handler)private booleanhandleConnectResponse(InternalState state, AbstractClientExchangeHandler handler)private booleanhandleResponse(InternalState state, AbstractClientExchangeHandler handler)private booleanneedAuthentication(InternalState state, AbstractClientExchangeHandler handler)voidprepare(org.apache.http.HttpHost target, org.apache.http.HttpRequest original, InternalState state, AbstractClientExchangeHandler handler)private voidprepareRequest(InternalState state, AbstractClientExchangeHandler handler)voidproduceContent(InternalState state, org.apache.http.nio.ContentEncoder encoder, org.apache.http.nio.IOControl ioctrl)voidrequestCompleted(InternalState state, AbstractClientExchangeHandler handler)voidresponseCompleted(InternalState state, AbstractClientExchangeHandler handler)voidresponseReceived(org.apache.http.HttpResponse response, InternalState state, AbstractClientExchangeHandler handler)private voidrewriteRequestURI(org.apache.http.client.methods.HttpRequestWrapper request, org.apache.http.conn.routing.HttpRoute route)
-
-
-
Field Detail
-
log
private final org.apache.commons.logging.Log log
-
httpProcessor
private final org.apache.http.protocol.HttpProcessor httpProcessor
-
proxyHttpProcessor
private final org.apache.http.protocol.HttpProcessor proxyHttpProcessor
-
routePlanner
private final org.apache.http.conn.routing.HttpRoutePlanner routePlanner
-
targetAuthStrategy
private final org.apache.http.client.AuthenticationStrategy targetAuthStrategy
-
proxyAuthStrategy
private final org.apache.http.client.AuthenticationStrategy proxyAuthStrategy
-
userTokenHandler
private final org.apache.http.client.UserTokenHandler userTokenHandler
-
redirectStrategy
private final org.apache.http.client.RedirectStrategy redirectStrategy
-
routeDirector
private final org.apache.http.conn.routing.HttpRouteDirector routeDirector
-
authenticator
private final org.apache.http.impl.auth.HttpAuthenticator authenticator
-
-
Constructor Detail
-
MainClientExec
public MainClientExec(org.apache.http.protocol.HttpProcessor httpProcessor, org.apache.http.conn.routing.HttpRoutePlanner routePlanner, org.apache.http.client.RedirectStrategy redirectStrategy, org.apache.http.client.AuthenticationStrategy targetAuthStrategy, org.apache.http.client.AuthenticationStrategy proxyAuthStrategy, org.apache.http.client.UserTokenHandler userTokenHandler)
-
-
Method Detail
-
prepare
public void prepare(org.apache.http.HttpHost target, org.apache.http.HttpRequest original, InternalState state, AbstractClientExchangeHandler handler) throws org.apache.http.HttpException, java.io.IOException- Specified by:
preparein interfaceInternalClientExec- Throws:
org.apache.http.HttpExceptionjava.io.IOException
-
generateRequest
public org.apache.http.HttpRequest generateRequest(InternalState state, AbstractClientExchangeHandler handler) throws java.io.IOException, org.apache.http.HttpException
- Specified by:
generateRequestin interfaceInternalClientExec- Throws:
java.io.IOExceptionorg.apache.http.HttpException
-
produceContent
public void produceContent(InternalState state, org.apache.http.nio.ContentEncoder encoder, org.apache.http.nio.IOControl ioctrl) throws java.io.IOException
- Specified by:
produceContentin interfaceInternalClientExec- Throws:
java.io.IOException
-
requestCompleted
public void requestCompleted(InternalState state, AbstractClientExchangeHandler handler)
- Specified by:
requestCompletedin interfaceInternalClientExec
-
responseReceived
public void responseReceived(org.apache.http.HttpResponse response, InternalState state, AbstractClientExchangeHandler handler) throws java.io.IOException, org.apache.http.HttpException- Specified by:
responseReceivedin interfaceInternalClientExec- Throws:
java.io.IOExceptionorg.apache.http.HttpException
-
consumeContent
public void consumeContent(InternalState state, org.apache.http.nio.ContentDecoder decoder, org.apache.http.nio.IOControl ioctrl) throws java.io.IOException
- Specified by:
consumeContentin interfaceInternalClientExec- Throws:
java.io.IOException
-
responseCompleted
public void responseCompleted(InternalState state, AbstractClientExchangeHandler handler) throws java.io.IOException, org.apache.http.HttpException
- Specified by:
responseCompletedin interfaceInternalClientExec- Throws:
java.io.IOExceptionorg.apache.http.HttpException
-
rewriteRequestURI
private void rewriteRequestURI(org.apache.http.client.methods.HttpRequestWrapper request, org.apache.http.conn.routing.HttpRoute route) throws org.apache.http.ProtocolException- Throws:
org.apache.http.ProtocolException
-
prepareRequest
private void prepareRequest(InternalState state, AbstractClientExchangeHandler handler) throws java.io.IOException, org.apache.http.HttpException
- Throws:
java.io.IOExceptionorg.apache.http.HttpException
-
createConnectRequest
private org.apache.http.HttpRequest createConnectRequest(org.apache.http.conn.routing.HttpRoute route, InternalState state) throws java.io.IOException, org.apache.http.HttpException- Throws:
java.io.IOExceptionorg.apache.http.HttpException
-
handleConnectResponse
private boolean handleConnectResponse(InternalState state, AbstractClientExchangeHandler handler) throws org.apache.http.HttpException
- Throws:
org.apache.http.HttpException
-
handleResponse
private boolean handleResponse(InternalState state, AbstractClientExchangeHandler handler) throws org.apache.http.HttpException
- Throws:
org.apache.http.HttpException
-
needAuthentication
private boolean needAuthentication(InternalState state, AbstractClientExchangeHandler handler) throws org.apache.http.HttpException
- Throws:
org.apache.http.HttpException
-
-