8081828384858687888990
final boolean isHttps) { super(); this.cfgCtx = cfgCtx; this.params = params; this.isHttps = isHttps; this.responseFactory = new DefaultHttpResponseFactory(); this.httpProcessor = getHttpProcessor(); this.connStrategy = new DefaultConnectionReuseStrategy(); this.cfg = NHttpConfiguration.getInstance(); this.workerPool = WorkerPoolFactory.getWorkerPool(
195196197198199200201
protected ConnectionReuseStrategy newConnectionReuseStrategy() { return new DefaultConnectionReuseStrategy(); } protected HttpResponseFactory newHttpResponseFactory() { return new DefaultHttpResponseFactory(); }
208209210211212213214215216217218
// Set up the HTTP service HttpService httpService = new HttpService( httpproc, new DefaultConnectionReuseStrategy(), new DefaultHttpResponseFactory()); httpService.setParams(this.params); httpService.setHandlerResolver(reqistry); // Start worker thread Thread t = new WorkerThread(httpService, conn);
111112113114115116117118119120121
httpproc.addInterceptor(new ResponseContent()); httpproc.addInterceptor(new ResponseConnControl()); BufferingHttpServiceHandler handler = new BufferingHttpServiceHandler( httpproc, new DefaultHttpResponseFactory(), new DefaultConnectionReuseStrategy(), params); // Set up request handlers HttpRequestHandlerRegistry reqistry = new HttpRequestHandlerRegistry();
349350351352353354355356357358359
// Set up the HTTP service HttpService httpService = new HttpService( httpProcessor, new DefaultConnectionReuseStrategy(), new DefaultHttpResponseFactory()); httpService.setParams(serverParams); httpService.setHandlerResolver(handlerRegistry); // Start worker thread Thread t = new Thread(new Worker(httpService, conn));
9293949596979899100101102
979899100101102103
public BasicNIOConnFactory( final SSLContext sslcontext, final SSLSetupHandler sslHandler, final HttpParams params) { this(sslcontext, sslHandler, new DefaultHttpResponseFactory(), new HeapByteBufferAllocator(), params); }
111112113114115116117
* a different implementation of the {@link HttpResponseFactory} interface. * * @return HTTP response factory. */ protected HttpResponseFactory createHttpResponseFactory() { return new DefaultHttpResponseFactory(); }
92939495969798
public SSLNHttpClientConnectionFactory( final SSLContext sslcontext, final SSLSetupHandler sslHandler, final HttpParams params) { this(sslcontext, sslHandler, new DefaultHttpResponseFactory(), new HeapByteBufferAllocator(), params); }
78798081828384
this.allocator = allocator; this.params = params; } public DefaultNHttpClientConnectionFactory(final HttpParams params) { this(new DefaultHttpResponseFactory(), new HeapByteBufferAllocator(), params); }