});
AsyncNHttpServiceHandler serviceHandler = new AsyncNHttpServiceHandler(
serverHttpProc,
new DefaultHttpResponseFactory(),
new DefaultConnectionReuseStrategy(),
this.serverParams);
serviceHandler.setHandlerResolver(
new SimpleNHttpRequestHandlerResolver(new RequestHandler()));
serviceHandler.setEventListener(
new SimpleEventListener());
HttpProcessor clientHttpProc = new ImmutableHttpProcessor(new HttpRequestInterceptor[] {
new RequestContent(),
new RequestTargetHost(),
new RequestConnControl(),
new RequestUserAgent(),
new RequestExpectContinue()});
AsyncNHttpClientHandler clientHandler = new AsyncNHttpClientHandler(
clientHttpProc,
requestExecutionHandler,
new DefaultConnectionReuseStrategy(),
this.clientParams);
clientHandler.setEventListener(new SimpleEventListener());
this.server.start(serviceHandler);