in shadows/httpclient/src/main/java/org/robolectric/shadows/httpclient/DefaultRequestDirector.java [190:277]
public DefaultRequestDirector(
final Log log,
final HttpRequestExecutor requestExec,
final ClientConnectionManager conman,
final ConnectionReuseStrategy reustrat,
final ConnectionKeepAliveStrategy kastrat,
final HttpRoutePlanner rouplan,
final HttpProcessor httpProcessor,
final HttpRequestRetryHandler retryHandler,
final RedirectHandler redirectHandler,
final AuthenticationHandler targetAuthHandler,
final AuthenticationHandler proxyAuthHandler,
final UserTokenHandler userTokenHandler,
final HttpParams params) {
if (log == null) {
throw new IllegalArgumentException
("Log may not be null.");
}
if (requestExec == null) {
throw new IllegalArgumentException
("Request executor may not be null.");
}
if (conman == null) {
throw new IllegalArgumentException
("Client connection manager may not be null.");
}
if (reustrat == null) {
throw new IllegalArgumentException
("Connection reuse strategy may not be null.");
}
if (kastrat == null) {
throw new IllegalArgumentException
("Connection keep alive strategy may not be null.");
}
if (rouplan == null) {
throw new IllegalArgumentException
("Route planner may not be null.");
}
if (httpProcessor == null) {
throw new IllegalArgumentException
("HTTP protocol processor may not be null.");
}
if (retryHandler == null) {
throw new IllegalArgumentException
("HTTP request retry handler may not be null.");
}
if (redirectHandler == null) {
throw new IllegalArgumentException
("Redirect handler may not be null.");
}
if (targetAuthHandler == null) {
throw new IllegalArgumentException
("Target authentication handler may not be null.");
}
if (proxyAuthHandler == null) {
throw new IllegalArgumentException
("Proxy authentication handler may not be null.");
}
if (userTokenHandler == null) {
throw new IllegalArgumentException
("User token handler may not be null.");
}
if (params == null) {
throw new IllegalArgumentException
("HTTP parameters may not be null");
}
this.log = log;
this.requestExec = requestExec;
this.connManager = conman;
this.reuseStrategy = reustrat;
this.keepAliveStrategy = kastrat;
this.routePlanner = rouplan;
this.httpProcessor = httpProcessor;
this.retryHandler = retryHandler;
this.redirectHandler = redirectHandler;
this.targetAuthHandler = targetAuthHandler;
this.proxyAuthHandler = proxyAuthHandler;
this.userTokenHandler = userTokenHandler;
this.params = params;
this.managedConn = null;
this.redirectCount = 0;
this.maxRedirects = this.params.getIntParameter(ClientPNames.MAX_REDIRECTS, 100);
this.targetAuthState = new AuthState();
this.proxyAuthState = new AuthState();
} // constructor