@Contract(threading=IMMUTABLE_CONDITIONAL) public class MainClientExec extends Object implements ClientExecChain
Modifier and Type | Field and Description |
---|---|
private HttpAuthenticator |
authenticator |
private HttpClientConnectionManager |
connManager |
private ConnectionKeepAliveStrategy |
keepAliveStrategy |
private org.apache.commons.logging.Log |
log |
private AuthenticationStrategy |
proxyAuthStrategy |
private HttpProcessor |
proxyHttpProcessor |
private HttpRequestExecutor |
requestExecutor |
private ConnectionReuseStrategy |
reuseStrategy |
private HttpRouteDirector |
routeDirector |
private AuthenticationStrategy |
targetAuthStrategy |
private UserTokenHandler |
userTokenHandler |
Constructor and Description |
---|
MainClientExec(HttpRequestExecutor requestExecutor,
HttpClientConnectionManager connManager,
ConnectionReuseStrategy reuseStrategy,
ConnectionKeepAliveStrategy keepAliveStrategy,
AuthenticationStrategy targetAuthStrategy,
AuthenticationStrategy proxyAuthStrategy,
UserTokenHandler userTokenHandler) |
MainClientExec(HttpRequestExecutor requestExecutor,
HttpClientConnectionManager connManager,
ConnectionReuseStrategy reuseStrategy,
ConnectionKeepAliveStrategy keepAliveStrategy,
HttpProcessor proxyHttpProcessor,
AuthenticationStrategy targetAuthStrategy,
AuthenticationStrategy proxyAuthStrategy,
UserTokenHandler userTokenHandler) |
Modifier and Type | Method and Description |
---|---|
private boolean |
createTunnelToProxy(HttpRoute route,
int hop,
HttpClientContext context)
Creates a tunnel to an intermediate proxy.
|
private boolean |
createTunnelToTarget(AuthState proxyAuthState,
HttpClientConnection managedConn,
HttpRoute route,
HttpRequest request,
HttpClientContext context)
Creates a tunnel to the target server.
|
(package private) void |
establishRoute(AuthState proxyAuthState,
HttpClientConnection managedConn,
HttpRoute route,
HttpRequest request,
HttpClientContext context)
Establishes the target route.
|
CloseableHttpResponse |
execute(HttpRoute route,
HttpRequestWrapper request,
HttpClientContext context,
HttpExecutionAware execAware)
Executes th request either by transmitting it to the target server or
by passing it onto the next executor in the request execution chain.
|
private boolean |
needAuthentication(AuthState targetAuthState,
AuthState proxyAuthState,
HttpRoute route,
HttpResponse response,
HttpClientContext context) |
private final org.apache.commons.logging.Log log
private final HttpRequestExecutor requestExecutor
private final HttpClientConnectionManager connManager
private final ConnectionReuseStrategy reuseStrategy
private final ConnectionKeepAliveStrategy keepAliveStrategy
private final HttpProcessor proxyHttpProcessor
private final AuthenticationStrategy targetAuthStrategy
private final AuthenticationStrategy proxyAuthStrategy
private final HttpAuthenticator authenticator
private final UserTokenHandler userTokenHandler
private final HttpRouteDirector routeDirector
public MainClientExec(HttpRequestExecutor requestExecutor, HttpClientConnectionManager connManager, ConnectionReuseStrategy reuseStrategy, ConnectionKeepAliveStrategy keepAliveStrategy, HttpProcessor proxyHttpProcessor, AuthenticationStrategy targetAuthStrategy, AuthenticationStrategy proxyAuthStrategy, UserTokenHandler userTokenHandler)
public MainClientExec(HttpRequestExecutor requestExecutor, HttpClientConnectionManager connManager, ConnectionReuseStrategy reuseStrategy, ConnectionKeepAliveStrategy keepAliveStrategy, AuthenticationStrategy targetAuthStrategy, AuthenticationStrategy proxyAuthStrategy, UserTokenHandler userTokenHandler)
public CloseableHttpResponse execute(HttpRoute route, HttpRequestWrapper request, HttpClientContext context, HttpExecutionAware execAware) throws IOException, HttpException
ClientExecChain
execute
in interface ClientExecChain
route
- connection route.request
- current request.context
- current HTTP context.execAware
- receiver of notifications of blocking I/O operations.IOException
- in case of a I/O error.
(this type of exceptions are potentially recoverable).HttpException
- in case of an HTTP protocol error
(usually this type of exceptions are non-recoverable).void establishRoute(AuthState proxyAuthState, HttpClientConnection managedConn, HttpRoute route, HttpRequest request, HttpClientContext context) throws HttpException, IOException
HttpException
IOException
private boolean createTunnelToTarget(AuthState proxyAuthState, HttpClientConnection managedConn, HttpRoute route, HttpRequest request, HttpClientContext context) throws HttpException, IOException
HttpException
IOException
private boolean createTunnelToProxy(HttpRoute route, int hop, HttpClientContext context) throws HttpException
HttpException
private boolean needAuthentication(AuthState targetAuthState, AuthState proxyAuthState, HttpRoute route, HttpResponse response, HttpClientContext context)
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses