final Queue<Job> queue = new ConcurrentLinkedQueue<Job>();
for (final Job job : jobs) {
queue.add(job);
}
final HttpProcessor serverHttpProc = new ImmutableHttpProcessor(new HttpResponseInterceptor[] {
new ResponseDate(),
new ResponseServer(),
new ResponseContent(),
new ResponseConnControl()
});
final ThrottlingHttpServiceHandler serviceHandler = new ThrottlingHttpServiceHandler(
serverHttpProc,
DefaultHttpResponseFactory.INSTANCE,
DefaultConnectionReuseStrategy.INSTANCE,
this.execService,
this.params);
serviceHandler.setHandlerResolver(
new SimpleHttpRequestHandlerResolver(new RequestHandler()));
serviceHandler.setEventListener(
new SimpleEventListener());
final HttpProcessor clientHttpProc = new ImmutableHttpProcessor(new HttpRequestInterceptor[] {
new RequestContent(),
new RequestTargetHost(),
new RequestConnControl(),
new RequestUserAgent(),
new RequestExpectContinue()});