hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1394997 [1/3] - in /httpcomponents/httpcore/trunk: httpcore-ab/src/main/java/org/apache/http/benchmark/ httpcore-ab/src/test/java/org/apache/http/benchmark/ httpcore-nio/src/examples/org/apache/http/examples/nio/ httpcore-nio/src/main/java...
Date Sat, 06 Oct 2012 11:05:20 GMT
Author: olegk
Date: Sat Oct  6 11:05:18 2012
New Revision: 1394997

URL: http://svn.apache.org/viewvc?rev=1394997&view=rev
Log:
Configuration API changes: HttpCore no longer uses HttpParams API for configuration

Removed:
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/params/HttpCoreConfigBuilder.java
Modified:
    httpcomponents/httpcore/trunk/httpcore-ab/src/main/java/org/apache/http/benchmark/BenchmarkWorker.java
    httpcomponents/httpcore/trunk/httpcore-ab/src/main/java/org/apache/http/benchmark/HttpBenchmark.java
    httpcomponents/httpcore/trunk/httpcore-ab/src/test/java/org/apache/http/benchmark/HttpServer.java
    httpcomponents/httpcore/trunk/httpcore-ab/src/test/java/org/apache/http/benchmark/SmokeTest.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpClient.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpReverseProxy.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpServer.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/DefaultNHttpClientConnectionFactory.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/DefaultNHttpServerConnectionFactory.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/NHttpConnectionBase.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/SSLNHttpClientConnectionFactory.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/SSLNHttpServerConnectionFactory.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/codecs/AbstractMessageParser.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/pool/BasicNIOConnPool.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SessionInputBufferImpl.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SessionOutputBufferImpl.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/BasicAsyncRequestExecutionHandler.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncRequestExecutor.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncRequester.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncService.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/impl/nio/reactor/TestBaseIOReactorSSL.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/impl/nio/reactor/TestDefaultIOReactors.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/impl/nio/reactor/TestDefaultListeningIOReactor.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestAsyncNHttpHandlers.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestHttpAsyncHandlerCancellable.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestHttpAsyncHandlers.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestHttpAsyncPrematureTermination.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestPipelining.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestThrottlingNHttpHandlers.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestTruncatedChunks.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestBasicAsyncRequestExecutionHandler.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestHttpAsyncRequester.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestHttpAsyncService.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/testserver/HttpCoreNIOTestBase.java
    httpcomponents/httpcore/trunk/httpcore/src/examples/org/apache/http/examples/ElementalHttpGet.java
    httpcomponents/httpcore/trunk/httpcore/src/examples/org/apache/http/examples/ElementalHttpPost.java
    httpcomponents/httpcore/trunk/httpcore/src/examples/org/apache/http/examples/ElementalHttpServer.java
    httpcomponents/httpcore/trunk/httpcore/src/examples/org/apache/http/examples/ElementalPoolingHttpGet.java
    httpcomponents/httpcore/trunk/httpcore/src/examples/org/apache/http/examples/ElementalReverseProxy.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/HttpMessage.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/AbstractMessageParser.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/pool/BasicConnFactory.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/params/CoreConnectionPNames.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/params/CoreProtocolPNames.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/params/DefaultedHttpParams.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/params/HttpAbstractParamBean.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/params/HttpConnectionParamBean.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/params/HttpConnectionParams.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/params/HttpParams.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/params/HttpProtocolParamBean.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/params/HttpProtocolParams.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/protocol/DefaultedHttpContext.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/protocol/ExecutionContext.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/protocol/HttpRequestExecutor.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/protocol/HttpService.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/protocol/RequestExpectContinue.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/protocol/RequestUserAgent.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/protocol/ResponseServer.java
    httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/integration/TestSyncHttp.java
    httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/message/TestAbstractMessage.java
    httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/message/TestBasicMessages.java
    httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/params/TestDefaultedHttpParams.java
    httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/protocol/TestHttpRequestExecutor.java
    httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/protocol/TestHttpService.java
    httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/protocol/TestStandardInterceptors.java
    httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/testserver/HttpClient.java
    httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/testserver/HttpServer.java

Modified: httpcomponents/httpcore/trunk/httpcore-ab/src/main/java/org/apache/http/benchmark/BenchmarkWorker.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-ab/src/main/java/org/apache/http/benchmark/BenchmarkWorker.java?rev=1394997&r1=1394996&r2=1394997&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-ab/src/main/java/org/apache/http/benchmark/BenchmarkWorker.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-ab/src/main/java/org/apache/http/benchmark/BenchmarkWorker.java Sat Oct  6 11:05:18 2012
@@ -45,9 +45,6 @@ import org.apache.http.HttpResponse;
 import org.apache.http.HttpStatus;
 import org.apache.http.entity.ContentType;
 import org.apache.http.impl.DefaultConnectionReuseStrategy;
-import org.apache.http.params.CoreConnectionPNames;
-import org.apache.http.params.Config;
-import org.apache.http.params.HttpParams;
 import org.apache.http.protocol.BasicHttpContext;
 import org.apache.http.protocol.ExecutionContext;
 import org.apache.http.protocol.HTTP;
@@ -70,51 +67,41 @@ import org.apache.http.protocol.RequestU
 class BenchmarkWorker implements Runnable {
 
     private final byte[] buffer = new byte[4096];
-    private final int verbosity;
     private final HttpContext context;
     private final HttpProcessor httpProcessor;
     private final HttpRequestExecutor httpexecutor;
     private final ConnectionReuseStrategy connstrategy;
     private final HttpRequest request;
     private final HttpHost targetHost;
-    private final int count;
-    private final boolean keepalive;
+    private final Config config;
     private final SocketFactory socketFactory;
     private final Stats stats = new Stats();
 
     public BenchmarkWorker(
             final HttpRequest request,
             final HttpHost targetHost,
-            int count,
-            boolean keepalive,
-            int verbosity,
-            final SocketFactory socketFactory) {
+            final SocketFactory socketFactory,
+            final Config config) {
         super();
         this.context = new BasicHttpContext(null);
         this.request = request;
         this.targetHost = targetHost;
-        this.count = count;
-        this.keepalive = keepalive;
-
+        this.config = config;
         this.httpProcessor = new ImmutableHttpProcessor(
                 new RequestContent(), 
                 new RequestTargetHost(), 
                 new RequestConnControl(),
-                new RequestUserAgent(),
+                new RequestUserAgent("HttpCore-AB/1.1"),
                 new RequestExpectContinue());
         this.httpexecutor = new HttpRequestExecutor();
 
         this.connstrategy = DefaultConnectionReuseStrategy.INSTANCE;
-        this.verbosity = verbosity;
         this.socketFactory = socketFactory;
     }
 
     public void run() {
-        HttpParams params = request.getParams();
-
         HttpResponse response = null;
-        int bufsize = Config.getInt(params, CoreConnectionPNames.SOCKET_BUFFER_SIZE, 8 * 1024);
-        BenchmarkConnection conn = new BenchmarkConnection(bufsize, stats);
+        BenchmarkConnection conn = new BenchmarkConnection(8 * 1024, stats);
 
         String scheme = targetHost.getSchemeName();
         String hostname = targetHost.getHostName();
@@ -133,6 +120,7 @@ class BenchmarkWorker implements Runnabl
         this.context.setAttribute(ExecutionContext.HTTP_REQUEST, this.request);
 
         stats.start();
+        int count = config.getRequests();
         for (int i = 0; i < count; i++) {
 
             try {
@@ -146,11 +134,9 @@ class BenchmarkWorker implements Runnabl
                         socket = new Socket();
                     }
                     
-                    int connTimeout = Config.getInt(params, CoreConnectionPNames.CONNECTION_TIMEOUT, 0);
-                    int soTimeout = Config.getInt(params, CoreConnectionPNames.SO_TIMEOUT, 0);
-
-                    socket.setSoTimeout(soTimeout);
-                    socket.connect(new InetSocketAddress(hostname, port), connTimeout);
+                    int timeout = config.getSocketTimeout();
+                    socket.setSoTimeout(timeout);
+                    socket.connect(new InetSocketAddress(hostname, port), timeout);
                     
                     conn.bind(socket);
                 }
@@ -165,7 +151,7 @@ class BenchmarkWorker implements Runnabl
 
                 } catch (HttpException e) {
                     stats.incWriteErrors();
-                    if (this.verbosity >= 2) {
+                    if (config.getVerbosity() >= 2) {
                         System.err.println("Failed HTTP request : " + e.getMessage());
                     }
                     continue;
@@ -192,7 +178,7 @@ class BenchmarkWorker implements Runnabl
                     int l = 0;
                     while ((l = instream.read(this.buffer)) != -1) {
                         contentlen += l;
-                        if (this.verbosity >= 4) {
+                        if (config.getVerbosity() >= 4) {
                             String s = new String(this.buffer, 0, l, charset.name());
                             System.out.print(s);
                         }
@@ -201,12 +187,12 @@ class BenchmarkWorker implements Runnabl
                     stats.setContentLength(contentlen);
                 }
 
-                if (this.verbosity >= 4) {
+                if (config.getVerbosity() >= 4) {
                     System.out.println();
                     System.out.println();
                 }
 
-                if (!keepalive || !this.connstrategy.keepAlive(response, this.context)) {
+                if (!config.isKeepAlive() || !this.connstrategy.keepAlive(response, this.context)) {
                     conn.close();
                 } else {
                     stats.incKeepAliveCount();
@@ -214,12 +200,12 @@ class BenchmarkWorker implements Runnabl
 
             } catch (IOException ex) {
                 stats.incFailureCount();
-                if (this.verbosity >= 2) {
+                if (config.getVerbosity() >= 2) {
                     System.err.println("I/O error: " + ex.getMessage());
                 }
             } catch (Exception ex) {
                 stats.incFailureCount();
-                if (this.verbosity >= 2) {
+                if (config.getVerbosity() >= 2) {
                     System.err.println("Generic error: " + ex.getMessage());
                 }
             }
@@ -238,14 +224,14 @@ class BenchmarkWorker implements Runnabl
             conn.close();
         } catch (IOException ex) {
             stats.incFailureCount();
-            if (this.verbosity >= 2) {
+            if (config.getVerbosity() >= 2) {
                 System.err.println("I/O error: " + ex.getMessage());
             }
         }
     }
 
     private void verboseOutput(HttpResponse response) {
-        if (this.verbosity >= 3) {
+        if (config.getVerbosity() >= 3) {
             System.out.println(">> " + request.getRequestLine().toString());
             Header[] headers = request.getAllHeaders();
             for (int h = 0; h < headers.length; h++) {
@@ -253,10 +239,10 @@ class BenchmarkWorker implements Runnabl
             }
             System.out.println();
         }
-        if (this.verbosity >= 2) {
+        if (config.getVerbosity() >= 2) {
             System.out.println(response.getStatusLine().getStatusCode());
         }
-        if (this.verbosity >= 3) {
+        if (config.getVerbosity() >= 3) {
             System.out.println("<< " + response.getStatusLine().toString());
             Header[] headers = response.getAllHeaders();
             for (int h = 0; h < headers.length; h++) {

Modified: httpcomponents/httpcore/trunk/httpcore-ab/src/main/java/org/apache/http/benchmark/HttpBenchmark.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-ab/src/main/java/org/apache/http/benchmark/HttpBenchmark.java?rev=1394997&r1=1394996&r2=1394997&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-ab/src/main/java/org/apache/http/benchmark/HttpBenchmark.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-ab/src/main/java/org/apache/http/benchmark/HttpBenchmark.java Sat Oct  6 11:05:18 2012
@@ -37,13 +37,10 @@ import org.apache.commons.cli.PosixParse
 import org.apache.http.Header;
 import org.apache.http.HttpHost;
 import org.apache.http.HttpRequest;
-import org.apache.http.HttpVersion;
 import org.apache.http.entity.ContentType;
 import org.apache.http.entity.FileEntity;
 import org.apache.http.message.BasicHttpEntityEnclosingRequest;
 import org.apache.http.message.BasicHttpRequest;
-import org.apache.http.params.HttpCoreConfigBuilder;
-import org.apache.http.params.HttpParams;
 import org.apache.http.protocol.HTTP;
 
 import java.security.KeyStore;
@@ -102,13 +99,6 @@ public class HttpBenchmark {
     }
 
     private HttpRequest createRequest() {
-        HttpParams params = new HttpCoreConfigBuilder()
-            .setProtocolVersion(config.isUseHttp1_0() ? HttpVersion.HTTP_1_0 : HttpVersion.HTTP_1_1)
-            .setUserAgent("HttpCore-AB/1.1")
-            .setUseExpectContinue(config.isUseExpectContinue())
-            .setSocketTimeout(config.getSocketTimeout())
-            .setSocketBufferSize(8 * 1024).build();
-
         URL url = config.getUrl();
         HttpEntity entity = null;
 
@@ -119,7 +109,7 @@ public class HttpBenchmark {
             fe.setChunked(config.isUseChunking());
             entity = fe;
         } else if (config.getPayloadText() != null) {
-            StringEntity se = new StringEntity(config.getPayloadText(), 
+            StringEntity se = new StringEntity(config.getPayloadText(),
                     ContentType.parse(config.getContentType()));
             se.setChunked(config.isUseChunking());
             entity = se;
@@ -144,7 +134,6 @@ public class HttpBenchmark {
             }
             request = new BasicHttpRequest(config.getMethod(), path);
         }
-        request.setParams(params);
 
         if (!config.isKeepAlive()) {
             request.addHeader(new DefaultHeader(HTTP.CONN_DIRECTIVE, HTTP.CONN_CLOSE));
@@ -177,7 +166,7 @@ public class HttpBenchmark {
         ResultProcessor.printResults(results);
         return "";
     }
-    
+
     public Results doExecute() throws Exception {
 
         URL url = config.getUrl();
@@ -220,7 +209,7 @@ public class HttpBenchmark {
                 KeyStore trustStore = KeyStore.getInstance(KeyStore.getDefaultType());
                 FileInputStream instream = new FileInputStream(config.getTrustStorePath());
                 try {
-                    trustStore.load(instream, config.getTrustStorePath() != null ? 
+                    trustStore.load(instream, config.getTrustStorePath() != null ?
                             config.getTrustStorePath().toCharArray() : null);
                 } finally {
                     try { instream.close(); } catch (IOException ignore) {}
@@ -250,16 +239,14 @@ public class HttpBenchmark {
             sc.init(keyManagers, trustManagers, null);
             socketFactory = sc.getSocketFactory();
         }
-        
+
         BenchmarkWorker[] workers = new BenchmarkWorker[config.getThreads()];
         for (int i = 0; i < workers.length; i++) {
             workers[i] = new BenchmarkWorker(
                     createRequest(),
                     host,
-                    config.getRequests(),
-                    config.isKeepAlive(),
-                    config.getVerbosity(),
-                    socketFactory);
+                    socketFactory,
+                    config);
             workerPool.execute(workers[i]);
         }
 

Modified: httpcomponents/httpcore/trunk/httpcore-ab/src/test/java/org/apache/http/benchmark/HttpServer.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-ab/src/test/java/org/apache/http/benchmark/HttpServer.java?rev=1394997&r1=1394996&r2=1394997&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-ab/src/test/java/org/apache/http/benchmark/HttpServer.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-ab/src/test/java/org/apache/http/benchmark/HttpServer.java Sat Oct  6 11:05:18 2012
@@ -40,7 +40,6 @@ import org.apache.http.HttpServerConnect
 import org.apache.http.impl.DefaultBHttpServerConnection;
 import org.apache.http.impl.DefaultConnectionReuseStrategy;
 import org.apache.http.impl.DefaultHttpResponseFactory;
-import org.apache.http.params.HttpParams;
 import org.apache.http.protocol.BasicHttpContext;
 import org.apache.http.protocol.HttpContext;
 import org.apache.http.protocol.HttpProcessor;
@@ -55,7 +54,6 @@ import org.apache.http.protocol.UriHttpR
 
 public class HttpServer {
 
-    private final HttpParams params;
     private final HttpProcessor httpproc;
     private final UriHttpRequestHandlerMapper reqistry;
     private final ServerSocket serversocket;
@@ -63,13 +61,12 @@ public class HttpServer {
     private Thread listener;
     private volatile boolean shutdown;
 
-    public HttpServer(final HttpParams params) throws IOException {
+    public HttpServer() throws IOException {
         super();
-        this.params = params;
         this.httpproc = new ImmutableHttpProcessor(
                 new HttpResponseInterceptor[] {
                         new ResponseDate(),
-                        new ResponseServer(),
+                        new ResponseServer("TEST-SERVER/1.1"),
                         new ResponseContent(),
                         new ResponseConnControl()
                 });
@@ -115,8 +112,7 @@ public class HttpServer {
                                 DefaultConnectionReuseStrategy.INSTANCE,
                                 DefaultHttpResponseFactory.INSTANCE,
                                 reqistry,
-                                null,
-                                params);
+                                null);
                         // Start worker thread
                         Thread t = new WorkerThread(httpService, conn);
                         t.setDaemon(true);

Modified: httpcomponents/httpcore/trunk/httpcore-ab/src/test/java/org/apache/http/benchmark/SmokeTest.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-ab/src/test/java/org/apache/http/benchmark/SmokeTest.java?rev=1394997&r1=1394996&r2=1394997&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-ab/src/test/java/org/apache/http/benchmark/SmokeTest.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-ab/src/test/java/org/apache/http/benchmark/SmokeTest.java Sat Oct  6 11:05:18 2012
@@ -9,8 +9,6 @@ import org.apache.http.HttpResponse;
 import org.apache.http.HttpStatus;
 import org.apache.http.entity.ContentType;
 import org.apache.http.entity.StringEntity;
-import org.apache.http.params.HttpCoreConfigBuilder;
-import org.apache.http.params.HttpParams;
 import org.apache.http.protocol.HttpContext;
 import org.apache.http.protocol.HttpRequestHandler;
 import org.junit.After;
@@ -24,11 +22,7 @@ public class SmokeTest {
 
     @Before
     public void setup() throws Exception {
-        HttpParams params = new HttpCoreConfigBuilder()
-            .setConnectTimeout(5000)
-            .setSocketTimeout(5000)
-            .setOriginServer("TEST-SERVER/1.1").build();
-        server = new HttpServer(params);
+        server = new HttpServer();
         server.registerHandler("/", new HttpRequestHandler() {
             public void handle(
                     final HttpRequest request,

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpClient.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpClient.java?rev=1394997&r1=1394996&r2=1394997&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpClient.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpClient.java Sat Oct  6 11:05:18 2012
@@ -35,7 +35,6 @@ import org.apache.http.HttpHost;
 import org.apache.http.HttpRequestInterceptor;
 import org.apache.http.HttpResponse;
 import org.apache.http.concurrent.FutureCallback;
-import org.apache.http.impl.DefaultConnectionReuseStrategy;
 import org.apache.http.impl.nio.DefaultHttpClientIODispatch;
 import org.apache.http.impl.nio.pool.BasicNIOConnPool;
 import org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor;
@@ -46,8 +45,6 @@ import org.apache.http.nio.protocol.Http
 import org.apache.http.nio.protocol.HttpAsyncRequester;
 import org.apache.http.nio.reactor.ConnectingIOReactor;
 import org.apache.http.nio.reactor.IOEventDispatch;
-import org.apache.http.params.HttpCoreConfigBuilder;
-import org.apache.http.params.HttpParams;
 import org.apache.http.protocol.BasicHttpContext;
 import org.apache.http.protocol.HttpProcessor;
 import org.apache.http.protocol.ImmutableHttpProcessor;
@@ -63,19 +60,13 @@ import org.apache.http.protocol.RequestU
 public class NHttpClient {
 
     public static void main(String[] args) throws Exception {
-        // HTTP parameters for the client
-        HttpParams params = new HttpCoreConfigBuilder()
-            .setSocketTimeout(3000)
-            .setConnectTimeout(3000)
-            .setSocketBufferSize(8 * 1024)
-            .setUserAgent("Test/1.1").build();
         // Create HTTP protocol processing chain
         HttpProcessor httpproc = new ImmutableHttpProcessor(new HttpRequestInterceptor[] {
                 // Use standard client-side protocol interceptors
                 new RequestContent(),
                 new RequestTargetHost(),
                 new RequestConnControl(),
-                new RequestUserAgent(),
+                new RequestUserAgent("Test/1.1"),
                 new RequestExpectContinue()});
         // Create client-side HTTP protocol handler
         HttpAsyncRequestExecutor protocolHandler = new HttpAsyncRequestExecutor();
@@ -107,8 +98,7 @@ public class NHttpClient {
         // Start the client thread
         t.start();
         // Create HTTP requester
-        HttpAsyncRequester requester = new HttpAsyncRequester(
-                httpproc, DefaultConnectionReuseStrategy.INSTANCE, params);
+        HttpAsyncRequester requester = new HttpAsyncRequester(httpproc);
         // Execute HTTP GETs to the following hosts and
         HttpHost[] targets = new HttpHost[] {
                 new HttpHost("www.apache.org", 80, "http"),

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpReverseProxy.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpReverseProxy.java?rev=1394997&r1=1394996&r2=1394997&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpReverseProxy.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpReverseProxy.java Sat Oct  6 11:05:18 2012
@@ -81,8 +81,6 @@ import org.apache.http.nio.protocol.UriH
 import org.apache.http.nio.reactor.ConnectingIOReactor;
 import org.apache.http.nio.reactor.IOEventDispatch;
 import org.apache.http.nio.reactor.ListeningIOReactor;
-import org.apache.http.params.HttpCoreConfigBuilder;
-import org.apache.http.params.HttpParams;
 import org.apache.http.pool.PoolStats;
 import org.apache.http.protocol.ExecutionContext;
 import org.apache.http.protocol.HttpContext;
@@ -122,10 +120,6 @@ public class NHttpReverseProxy {
 
         System.out.println("Reverse proxy to " + targetHost);
 
-        HttpParams params = new HttpCoreConfigBuilder()
-            .setUserAgent("Test/1.1")
-            .setOriginServer("Test/1.1").build();
-
         IOReactorConfig config = IOReactorConfig.custom()
             .setIoThreadCount(1)
             .setSoTimeout(3000)
@@ -138,7 +132,7 @@ public class NHttpReverseProxy {
         HttpProcessor inhttpproc = new ImmutableHttpProcessor(
                 new HttpResponseInterceptor[] {
                         new ResponseDate(),
-                        new ResponseServer(),
+                        new ResponseServer("Test/1.1"),
                         new ResponseContent(),
                         new ResponseConnControl()
          });
@@ -149,13 +143,13 @@ public class NHttpReverseProxy {
                         new RequestContent(),
                         new RequestTargetHost(),
                         new RequestConnControl(),
-                        new RequestUserAgent(),
+                        new RequestUserAgent("Test/1.1"),
                         new RequestExpectContinue()
         });
 
         ProxyClientProtocolHandler clientHandler = new ProxyClientProtocolHandler();
         HttpAsyncRequester executor = new HttpAsyncRequester(
-                outhttpproc, new ProxyOutgoingConnectionReuseStrategy(), params);
+                outhttpproc, new ProxyOutgoingConnectionReuseStrategy());
 
         ProxyConnPool connPool = new ProxyConnPool(connectingIOReactor, 3, TimeUnit.SECONDS);
         connPool.setMaxTotal(100);
@@ -165,7 +159,9 @@ public class NHttpReverseProxy {
         handlerRegistry.register("*", new ProxyRequestHandler(targetHost, executor, connPool));
 
         ProxyServiceHandler serviceHandler = new ProxyServiceHandler(
-                inhttpproc, new ProxyIncomingConnectionReuseStrategy(), handlerRegistry, params);
+                inhttpproc,
+                new ProxyIncomingConnectionReuseStrategy(),
+                handlerRegistry);
 
         final IOEventDispatch connectingEventDispatch = new DefaultHttpClientIODispatch(
                 clientHandler);
@@ -796,9 +792,8 @@ public class NHttpReverseProxy {
         public ProxyServiceHandler(
                 final HttpProcessor httpProcessor,
                 final ConnectionReuseStrategy reuseStrategy,
-                final HttpAsyncRequestHandlerMapper handlerResolver,
-                final HttpParams params) {
-            super(httpProcessor, reuseStrategy, handlerResolver, params);
+                final HttpAsyncRequestHandlerMapper handlerResolver) {
+            super(httpProcessor, reuseStrategy, null, handlerResolver, null);
         }
 
         @Override

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpServer.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpServer.java?rev=1394997&r1=1394996&r2=1394997&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpServer.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpServer.java Sat Oct  6 11:05:18 2012
@@ -46,7 +46,6 @@ import org.apache.http.HttpResponseInter
 import org.apache.http.HttpStatus;
 import org.apache.http.MethodNotSupportedException;
 import org.apache.http.entity.ContentType;
-import org.apache.http.impl.DefaultConnectionReuseStrategy;
 import org.apache.http.impl.nio.DefaultHttpServerIODispatch;
 import org.apache.http.impl.nio.DefaultNHttpServerConnection;
 import org.apache.http.impl.nio.DefaultNHttpServerConnectionFactory;
@@ -67,8 +66,6 @@ import org.apache.http.nio.protocol.Http
 import org.apache.http.nio.protocol.UriHttpAsyncRequestHandlerMapper;
 import org.apache.http.nio.reactor.IOEventDispatch;
 import org.apache.http.nio.reactor.ListeningIOReactor;
-import org.apache.http.params.HttpCoreConfigBuilder;
-import org.apache.http.params.HttpParams;
 import org.apache.http.protocol.ExecutionContext;
 import org.apache.http.protocol.HttpContext;
 import org.apache.http.protocol.HttpProcessor;
@@ -95,10 +92,6 @@ public class NHttpServer {
         if (args.length >= 2) {
             port = Integer.parseInt(args[1]);
         }
-        // HTTP parameters for the server
-        HttpParams params = new HttpCoreConfigBuilder()
-            .setUserAgent("Test/1.1")
-            .setOriginServer("Test/1.1").build();
 
         // Create HTTP protocol processing chain
         HttpProcessor httpproc = new ImmutableHttpProcessor(new HttpResponseInterceptor[] {
@@ -113,8 +106,7 @@ public class NHttpServer {
         // Register the default handler for all URIs
         reqistry.register("*", new HttpFileHandler(docRoot));
         // Create server-side HTTP protocol handler
-        HttpAsyncService protocolHandler = new HttpAsyncService(
-                httpproc, DefaultConnectionReuseStrategy.INSTANCE, reqistry, params) {
+        HttpAsyncService protocolHandler = new HttpAsyncService(httpproc, reqistry) {
 
             @Override
             public void connected(final NHttpServerConnection conn) {

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/DefaultNHttpClientConnectionFactory.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/DefaultNHttpClientConnectionFactory.java?rev=1394997&r1=1394996&r2=1394997&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/DefaultNHttpClientConnectionFactory.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/DefaultNHttpClientConnectionFactory.java Sat Oct  6 11:05:18 2012
@@ -47,6 +47,7 @@ import org.apache.http.util.Args;
  *
  * @since 4.2
  */
+@SuppressWarnings("deprecation")
 @Immutable
 public class DefaultNHttpClientConnectionFactory
     implements NHttpConnectionFactory<DefaultNHttpClientConnection> {

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/DefaultNHttpServerConnectionFactory.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/DefaultNHttpServerConnectionFactory.java?rev=1394997&r1=1394996&r2=1394997&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/DefaultNHttpServerConnectionFactory.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/DefaultNHttpServerConnectionFactory.java Sat Oct  6 11:05:18 2012
@@ -47,6 +47,7 @@ import org.apache.http.util.Args;
  *
  * @since 4.2
  */
+@SuppressWarnings("deprecation")
 @Immutable
 public class DefaultNHttpServerConnectionFactory
     implements NHttpConnectionFactory<DefaultNHttpServerConnection> {

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/NHttpConnectionBase.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/NHttpConnectionBase.java?rev=1394997&r1=1394996&r2=1394997&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/NHttpConnectionBase.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/NHttpConnectionBase.java Sat Oct  6 11:05:18 2012
@@ -93,6 +93,7 @@ import org.apache.http.util.NetUtils;
  *
  * @since 4.0
  */
+@SuppressWarnings("deprecation")
 @NotThreadSafe
 public class NHttpConnectionBase
         implements NHttpConnection, HttpInetConnection, SessionBufferStatus, SocketAccessor {

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/SSLNHttpClientConnectionFactory.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/SSLNHttpClientConnectionFactory.java?rev=1394997&r1=1394996&r2=1394997&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/SSLNHttpClientConnectionFactory.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/SSLNHttpClientConnectionFactory.java Sat Oct  6 11:05:18 2012
@@ -53,6 +53,7 @@ import org.apache.http.util.Args;
  *
  * @since 4.2
  */
+@SuppressWarnings("deprecation")
 @Immutable
 public class SSLNHttpClientConnectionFactory
     implements NHttpConnectionFactory<DefaultNHttpClientConnection> {

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/SSLNHttpServerConnectionFactory.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/SSLNHttpServerConnectionFactory.java?rev=1394997&r1=1394996&r2=1394997&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/SSLNHttpServerConnectionFactory.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/SSLNHttpServerConnectionFactory.java Sat Oct  6 11:05:18 2012
@@ -52,6 +52,7 @@ import org.apache.http.util.Args;
  *
  * @since 4.2
  */
+@SuppressWarnings("deprecation")
 @Immutable
 public class SSLNHttpServerConnectionFactory
     implements NHttpConnectionFactory<DefaultNHttpServerConnection> {

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/codecs/AbstractMessageParser.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/codecs/AbstractMessageParser.java?rev=1394997&r1=1394996&r2=1394997&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/codecs/AbstractMessageParser.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/codecs/AbstractMessageParser.java Sat Oct  6 11:05:18 2012
@@ -55,6 +55,7 @@ import org.apache.http.util.CharArrayBuf
  *
  * @since 4.0
  */
+@SuppressWarnings("deprecation")
 @NotThreadSafe
 public abstract class AbstractMessageParser<T extends HttpMessage> implements NHttpMessageParser<T> {
 

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/pool/BasicNIOConnPool.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/pool/BasicNIOConnPool.java?rev=1394997&r1=1394996&r2=1394997&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/pool/BasicNIOConnPool.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/pool/BasicNIOConnPool.java Sat Oct  6 11:05:18 2012
@@ -55,6 +55,7 @@ import org.apache.http.util.Args;
  * @see HttpHost
  * @since 4.2
  */
+@SuppressWarnings("deprecation")
 @ThreadSafe
 public class BasicNIOConnPool extends AbstractNIOConnPool<HttpHost, NHttpClientConnection, BasicNIOPoolEntry> {
 

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SessionInputBufferImpl.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SessionInputBufferImpl.java?rev=1394997&r1=1394996&r2=1394997&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SessionInputBufferImpl.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SessionInputBufferImpl.java Sat Oct  6 11:05:18 2012
@@ -56,6 +56,7 @@ import org.apache.http.util.CharsetUtils
  *
  * @since 4.0
  */
+@SuppressWarnings("deprecation")
 @NotThreadSafe
 public class SessionInputBufferImpl extends ExpandableBuffer implements SessionInputBuffer {
 

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SessionOutputBufferImpl.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SessionOutputBufferImpl.java?rev=1394997&r1=1394996&r2=1394997&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SessionOutputBufferImpl.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SessionOutputBufferImpl.java Sat Oct  6 11:05:18 2012
@@ -56,6 +56,7 @@ import org.apache.http.util.CharsetUtils
  *
  * @since 4.0
  */
+@SuppressWarnings("deprecation")
 @NotThreadSafe
 public class SessionOutputBufferImpl extends ExpandableBuffer implements SessionOutputBuffer {
 

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/BasicAsyncRequestExecutionHandler.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/BasicAsyncRequestExecutionHandler.java?rev=1394997&r1=1394996&r2=1394997&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/BasicAsyncRequestExecutionHandler.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/BasicAsyncRequestExecutionHandler.java Sat Oct  6 11:05:18 2012
@@ -37,10 +37,10 @@ import org.apache.http.HttpRequest;
 import org.apache.http.HttpResponse;
 import org.apache.http.concurrent.BasicFuture;
 import org.apache.http.concurrent.FutureCallback;
+import org.apache.http.impl.DefaultConnectionReuseStrategy;
 import org.apache.http.nio.ContentDecoder;
 import org.apache.http.nio.ContentEncoder;
 import org.apache.http.nio.IOControl;
-import org.apache.http.params.DefaultedHttpParams;
 import org.apache.http.params.HttpParams;
 import org.apache.http.protocol.HttpContext;
 import org.apache.http.protocol.HttpProcessor;
@@ -61,10 +61,16 @@ public class BasicAsyncRequestExecutionH
     private final HttpContext localContext;
     private final HttpProcessor httppocessor;
     private final ConnectionReuseStrategy reuseStrategy;
-    private final HttpParams params;
 
     private volatile boolean requestSent;
 
+    /**
+     * @deprecated (4.3) use
+     *   {@link BasicAsyncRequestExecutionHandler#BasicAsyncRequestExecutionHandler(
+     *     HttpAsyncRequestProducer, HttpAsyncResponseConsumer, FutureCallback, HttpContext,
+     *     HttpProcessor, ConnectionReuseStrategy)}
+     */
+    @Deprecated
     public BasicAsyncRequestExecutionHandler(
             final HttpAsyncRequestProducer requestProducer,
             final HttpAsyncResponseConsumer<T> responseConsumer,
@@ -86,9 +92,15 @@ public class BasicAsyncRequestExecutionH
         this.localContext = localContext;
         this.httppocessor = httppocessor;
         this.reuseStrategy = reuseStrategy;
-        this.params = params;
     }
 
+    /**
+     * @deprecated (4.3) use
+     *   {@link BasicAsyncRequestExecutionHandler#BasicAsyncRequestExecutionHandler(
+     *     HttpAsyncRequestProducer, HttpAsyncResponseConsumer, FutureCallback, HttpContext,
+     *     HttpProcessor, ConnectionReuseStrategy)}
+     */
+    @Deprecated
     public BasicAsyncRequestExecutionHandler(
             final HttpAsyncRequestProducer requestProducer,
             final HttpAsyncResponseConsumer<T> responseConsumer,
@@ -99,6 +111,54 @@ public class BasicAsyncRequestExecutionH
         this(requestProducer, responseConsumer, null, localContext, httppocessor, reuseStrategy, params);
     }
 
+    /**
+     * Creates new instance of BasicAsyncRequestExecutionHandler.
+     *
+     * @param requestProducer the request producer.
+     * @param responseConsumer the response consumer.
+     * @param callback the future callback invoked when the operation is completed.
+     * @param localContext the local execution context.
+     * @param httppocessor the HTTP protocol processor.
+     * @param reuseStrategy the connection re-use strategy. If <code>null</code>
+     *   {@link DefaultConnectionReuseStrategy#INSTANCE} will be used.
+     *
+     * @since 4.3
+     */
+    public BasicAsyncRequestExecutionHandler(
+            final HttpAsyncRequestProducer requestProducer,
+            final HttpAsyncResponseConsumer<T> responseConsumer,
+            final FutureCallback<T> callback,
+            final HttpContext localContext,
+            final HttpProcessor httppocessor,
+            final ConnectionReuseStrategy reuseStrategy) {
+        super();
+        this.requestProducer = Args.notNull(requestProducer, "Request producer");
+        this.responseConsumer = Args.notNull(responseConsumer, "Response consumer");
+        this.future = new BasicFuture<T>(callback);
+        this.localContext = Args.notNull(localContext, "HTTP context");
+        this.httppocessor = Args.notNull(httppocessor, "HTTP processor");
+        this.reuseStrategy = reuseStrategy != null ? reuseStrategy :
+            DefaultConnectionReuseStrategy.INSTANCE;
+    }
+
+    /**
+     * Creates new instance of BasicAsyncRequestExecutionHandler.
+     *
+     * @param requestProducer the request producer.
+     * @param responseConsumer the response consumer.
+     * @param localContext the local execution context.
+     * @param httppocessor the HTTP protocol processor.
+     *
+     * @since 4.3
+     */
+    public BasicAsyncRequestExecutionHandler(
+            final HttpAsyncRequestProducer requestProducer,
+            final HttpAsyncResponseConsumer<T> responseConsumer,
+            final HttpContext localContext,
+            final HttpProcessor httppocessor) {
+        this(requestProducer, responseConsumer, null, localContext, httppocessor, null);
+    }
+
     public Future<T> getFuture() {
         return this.future;
     }
@@ -126,9 +186,7 @@ public class BasicAsyncRequestExecutionH
     }
 
     public HttpRequest generateRequest() throws IOException, HttpException {
-        HttpRequest request = this.requestProducer.generateRequest();
-        request.setParams(new DefaultedHttpParams(request.getParams(), this.params));
-        return request;
+        return this.requestProducer.generateRequest();
     }
 
     public void produceContent(
@@ -149,7 +207,6 @@ public class BasicAsyncRequestExecutionH
     }
 
     public void responseReceived(final HttpResponse response) throws IOException, HttpException {
-        response.setParams(new DefaultedHttpParams(response.getParams(), this.params));
         this.responseConsumer.responseReceived(response);
     }
 

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncRequestExecutor.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncRequestExecutor.java?rev=1394997&r1=1394996&r2=1394997&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncRequestExecutor.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncRequestExecutor.java Sat Oct  6 11:05:18 2012
@@ -46,13 +46,10 @@ import org.apache.http.nio.ContentEncode
 import org.apache.http.nio.NHttpClientConnection;
 import org.apache.http.nio.NHttpClientEventHandler;
 import org.apache.http.nio.NHttpConnection;
-import org.apache.http.params.CoreConnectionPNames;
-import org.apache.http.params.CoreProtocolPNames;
-import org.apache.http.params.Config;
-import org.apache.http.params.HttpParams;
 import org.apache.http.protocol.ExecutionContext;
 import org.apache.http.protocol.HttpContext;
 import org.apache.http.protocol.HttpProcessor;
+import org.apache.http.util.Args;
 
 /**
  * <tt>HttpAsyncRequestExecutor</tt> is a fully asynchronous HTTP client side
@@ -73,13 +70,6 @@ import org.apache.http.protocol.HttpProc
  * complete when the {@link HttpAsyncRequestExecutionHandler#isDone()} method
  * returns <code>true</code>. The {@link HttpAsyncRequester} utility class can
  * be used to facilitate initiation of asynchronous HTTP request execution.
- * <p/>
- * The following parameters can be used to customize the behavior of this
- * class:
- * <ul>
- *  <li>{@link org.apache.http.params.CoreProtocolPNames#WAIT_FOR_CONTINUE}</li>
- *  <li>{@link org.apache.http.params.CoreConnectionPNames#SO_TIMEOUT}</li>
- * </ul>
  *
  * @see HttpAsyncRequestExecutionHandler
  *
@@ -88,10 +78,23 @@ import org.apache.http.protocol.HttpProc
 @Immutable
 public class HttpAsyncRequestExecutor implements NHttpClientEventHandler {
 
+    public static final int DEFAULT_WAIT_FOR_CONTINUE = 3000;
     public static final String HTTP_HANDLER = "http.nio.exchange-handler";
 
-    public HttpAsyncRequestExecutor() {
+    private final int waitForContinue;
+
+    /**
+     * Creates new instance of HttpAsyncRequestExecutor.
+     *
+     * @since 4.3
+     */
+    public HttpAsyncRequestExecutor(int waitForContinue) {
         super();
+        this.waitForContinue = Args.positive(waitForContinue, "Wait for continue time");
+    }
+
+    public HttpAsyncRequestExecutor() {
+        this(DEFAULT_WAIT_FOR_CONTINUE);
     }
 
     public void connected(
@@ -147,9 +150,6 @@ public class HttpAsyncRequestExecutor im
         HttpRequest request = handler.generateRequest();
         context.setAttribute(ExecutionContext.HTTP_REQUEST, request);
 
-        HttpParams params = request.getParams();
-        conn.setSocketTimeout(Config.getInt(params, CoreConnectionPNames.SO_TIMEOUT, 0));
-
         HttpProcessor httppocessor = handler.getHttpProcessor();
         httppocessor.process(request, context);
 
@@ -161,9 +161,7 @@ public class HttpAsyncRequestExecutor im
             if (((HttpEntityEnclosingRequest) request).expectContinue()) {
                 int timeout = conn.getSocketTimeout();
                 state.setTimeout(timeout);
-                timeout = Config.getInt(request.getParams(), 
-                        CoreProtocolPNames.WAIT_FOR_CONTINUE, 3000);
-                conn.setSocketTimeout(timeout);
+                conn.setSocketTimeout(this.waitForContinue);
                 state.setRequestState(MessageState.ACK_EXPECTED);
             } else {
                 state.setRequestState(MessageState.BODY_STREAM);

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncRequester.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncRequester.java?rev=1394997&r1=1394996&r2=1394997&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncRequester.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncRequester.java Sat Oct  6 11:05:18 2012
@@ -37,6 +37,7 @@ import org.apache.http.HttpHost;
 import org.apache.http.annotation.Immutable;
 import org.apache.http.concurrent.BasicFuture;
 import org.apache.http.concurrent.FutureCallback;
+import org.apache.http.impl.DefaultConnectionReuseStrategy;
 import org.apache.http.nio.NHttpClientConnection;
 import org.apache.http.params.HttpParams;
 import org.apache.http.pool.ConnPool;
@@ -60,16 +61,45 @@ public class HttpAsyncRequester {
 
     private final HttpProcessor httppocessor;
     private final ConnectionReuseStrategy reuseStrategy;
-    private final HttpParams params;
 
+    /**
+     * @deprecated (4.3) use {@link HttpAsyncRequester#HttpAsyncRequester(HttpProcessor,
+     *   ConnectionReuseStrategy)}
+     */
     public HttpAsyncRequester(
             final HttpProcessor httppocessor,
             final ConnectionReuseStrategy reuseStrategy,
             final HttpParams params) {
+        this(httppocessor, reuseStrategy);
+    }
+
+    /**
+     * Creates new instance of HttpAsyncRequester.
+     *
+     * @param httppocessor the HTTP protocol processor.
+     * @param reuseStrategy the connection re-use strategy. If <code>null</code>
+     *   {@link DefaultConnectionReuseStrategy#INSTANCE} will be used.
+     *
+     * @since 4.3
+     */
+    public HttpAsyncRequester(
+            final HttpProcessor httppocessor,
+            final ConnectionReuseStrategy reuseStrategy) {
         super();
         this.httppocessor = httppocessor;
-        this.reuseStrategy = reuseStrategy;
-        this.params = params;
+        this.reuseStrategy = reuseStrategy != null ? reuseStrategy :
+            DefaultConnectionReuseStrategy.INSTANCE;
+    }
+
+    /**
+     * Creates new instance of HttpAsyncRequester.
+     *
+     * @param httppocessor the HTTP protocol processor.
+     *
+     * @since 4.3
+     */
+    public HttpAsyncRequester(final HttpProcessor httppocessor) {
+        this(httppocessor, null);
     }
 
     /**
@@ -95,7 +125,7 @@ public class HttpAsyncRequester {
         Args.notNull(context, "HTTP context");
         BasicAsyncRequestExecutionHandler<T> handler = new BasicAsyncRequestExecutionHandler<T>(
                 requestProducer, responseConsumer, callback, context,
-                this.httppocessor, this.reuseStrategy, this.params);
+                this.httppocessor, this.reuseStrategy);
         doExecute(handler, conn);
         return handler.getFuture();
     }
@@ -244,7 +274,7 @@ public class HttpAsyncRequester {
             BasicAsyncRequestExecutionHandler<T> handler = new BasicAsyncRequestExecutionHandler<T>(
                     this.requestProducer, this.responseConsumer,
                     new RequestExecutionCallback<T, E>(this.requestFuture, result, this.connPool),
-                    this.context, httppocessor, reuseStrategy, params);
+                    this.context, httppocessor, reuseStrategy);
             doExecute(handler, conn);
         }
 

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncService.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncService.java?rev=1394997&r1=1394996&r2=1394997&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncService.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncService.java Sat Oct  6 11:05:18 2012
@@ -47,6 +47,7 @@ import org.apache.http.UnsupportedHttpVe
 import org.apache.http.annotation.Immutable;
 import org.apache.http.concurrent.Cancellable;
 import org.apache.http.entity.ContentType;
+import org.apache.http.impl.DefaultConnectionReuseStrategy;
 import org.apache.http.impl.DefaultHttpResponseFactory;
 import org.apache.http.nio.ContentDecoder;
 import org.apache.http.nio.ContentEncoder;
@@ -54,9 +55,6 @@ import org.apache.http.nio.NHttpConnecti
 import org.apache.http.nio.NHttpServerConnection;
 import org.apache.http.nio.NHttpServerEventHandler;
 import org.apache.http.nio.entity.NStringEntity;
-import org.apache.http.params.CoreConnectionPNames;
-import org.apache.http.params.DefaultedHttpParams;
-import org.apache.http.params.Config;
 import org.apache.http.params.HttpParams;
 import org.apache.http.protocol.BasicHttpContext;
 import org.apache.http.protocol.ExecutionContext;
@@ -92,12 +90,6 @@ import org.apache.http.util.Args;
  * request handling to another service or a worker thread. HTTP response can
  * be submitted as a later a later point of time once response content becomes
  * available.
- * <p/>
- * The following parameters can be used to customize the behavior of this
- * class:
- * <ul>
- *  <li>{@link org.apache.http.params.CoreConnectionPNames#SO_TIMEOUT}</li>
- * </ul>
  *
  * @since 4.2
  */
@@ -111,114 +103,101 @@ public class HttpAsyncService implements
     private final HttpResponseFactory responseFactory;
     private final HttpAsyncRequestHandlerMapper handlerMapper;
     private final HttpAsyncExpectationVerifier expectationVerifier;
-    private final HttpParams params;
 
     /**
-     * Creates an instance of <tt>HttpAsyncServerProtocolHandler</tt>.
+     * Creates new instance of <tt>HttpAsyncServerProtocolHandler</tt>.
      *
      * @param httpProcessor HTTP protocol processor (required).
      * @param connStrategy Connection re-use strategy (required).
      * @param responseFactory HTTP response factory (required).
-     * @param handlerMapper Request handler mapper.
+     * @param handlerResolver Request handler resolver.
      * @param expectationVerifier Request expectation verifier (optional).
      * @param params HTTP parameters (required).
-     * 
-     * @since 4.3
+     *
+     * @deprecated (4.3) use {@link HttpAsyncService#HttpAsyncService(HttpProcessor,
+     *  ConnectionReuseStrategy, HttpResponseFactory, HttpAsyncRequestHandlerMapper,
+     *    HttpAsyncExpectationVerifier)}
      */
     public HttpAsyncService(
             final HttpProcessor httpProcessor,
             final ConnectionReuseStrategy connStrategy,
             final HttpResponseFactory responseFactory,
-            final HttpAsyncRequestHandlerMapper handlerMapper,
+            final HttpAsyncRequestHandlerResolver handlerResolver,
             final HttpAsyncExpectationVerifier expectationVerifier,
             final HttpParams params) {
-        super();
-        Args.notNull(httpProcessor, "HTTP processor");
-        Args.notNull(connStrategy, "Connection reuse strategy");
-        Args.notNull(responseFactory, "Response factory");
-        Args.notNull(params, "HTTP parameters");
-        this.httpProcessor = httpProcessor;
-        this.connStrategy = connStrategy;
-        this.responseFactory = responseFactory;
-        this.handlerMapper = handlerMapper;
-        this.expectationVerifier = expectationVerifier;
-        this.params = params;
+        this(httpProcessor,
+             connStrategy,
+             responseFactory,
+             new HttpAsyncRequestHandlerResolverAdapter(handlerResolver),
+             expectationVerifier);
     }
 
     /**
-     * Creates an instance of <tt>HttpAsyncServerProtocolHandler</tt>.
+     * Creates new instance of <tt>HttpAsyncServerProtocolHandler</tt>.
      *
      * @param httpProcessor HTTP protocol processor (required).
      * @param connStrategy Connection re-use strategy (required).
-     * @param responseFactory HTTP response factory (required).
      * @param handlerResolver Request handler resolver.
-     * @param expectationVerifier Request expectation verifier (optional).
      * @param params HTTP parameters (required).
-     * 
+     *
      * @deprecated (4.3) use {@link HttpAsyncService#HttpAsyncService(HttpProcessor,
-     *  ConnectionReuseStrategy, HttpResponseFactory, HttpAsyncRequestHandlerMapper, HttpAsyncExpectationVerifier, HttpParams)}
+     *   ConnectionReuseStrategy, HttpResponseFactory, HttpAsyncRequestHandlerMapper,
+     *   HttpAsyncExpectationVerifier)}
      */
+    @Deprecated
     public HttpAsyncService(
             final HttpProcessor httpProcessor,
             final ConnectionReuseStrategy connStrategy,
-            final HttpResponseFactory responseFactory,
             final HttpAsyncRequestHandlerResolver handlerResolver,
-            final HttpAsyncExpectationVerifier expectationVerifier,
             final HttpParams params) {
         this(httpProcessor,
              connStrategy,
-             responseFactory,
+             DefaultHttpResponseFactory.INSTANCE,
              new HttpAsyncRequestHandlerResolverAdapter(handlerResolver),
-             expectationVerifier,
-             params);
+             null);
     }
 
     /**
-     * Creates an instance of <tt>HttpAsyncServerProtocolHandler</tt>.
+     * Creates new instance of <tt>HttpAsyncServerProtocolHandler</tt>.
      *
-     * @param httpProcessor HTTP protocol processor (required).
-     * @param connStrategy Connection re-use strategy (required).
+     * @param httpProcessor HTTP protocol processor.
+     * @param connStrategy Connection re-use strategy. If <code>null</code>
+     *   {@link DefaultConnectionReuseStrategy#INSTANCE} will be used.
+     * @param responseFactory HTTP response factory. If <code>null</code>
+     *   {@link DefaultHttpResponseFactory#INSTANCE} will be used.
      * @param handlerMapper Request handler mapper.
-     * @param params HTTP parameters (required).
-     * 
+     * @param expectationVerifier Request expectation verifier. May be <code>null</code>.
+     *
      * @since 4.3
      */
     public HttpAsyncService(
             final HttpProcessor httpProcessor,
             final ConnectionReuseStrategy connStrategy,
+            final HttpResponseFactory responseFactory,
             final HttpAsyncRequestHandlerMapper handlerMapper,
-            final HttpParams params) {
-        this(httpProcessor,
-             connStrategy,
-             DefaultHttpResponseFactory.INSTANCE,
-             handlerMapper,
-             null,
-             params);
+            final HttpAsyncExpectationVerifier expectationVerifier) {
+        super();
+        this.httpProcessor = Args.notNull(httpProcessor, "HTTP processor");
+        this.connStrategy = connStrategy != null ? connStrategy :
+            DefaultConnectionReuseStrategy.INSTANCE;
+        this.responseFactory = responseFactory != null ? responseFactory :
+            DefaultHttpResponseFactory.INSTANCE;
+        this.handlerMapper = handlerMapper;
+        this.expectationVerifier = expectationVerifier;
     }
 
     /**
-     * Creates an instance of <tt>HttpAsyncServerProtocolHandler</tt>.
+     * Creates new instance of <tt>HttpAsyncServerProtocolHandler</tt>.
      *
-     * @param httpProcessor HTTP protocol processor (required).
-     * @param connStrategy Connection re-use strategy (required).
-     * @param handlerResolver Request handler resolver.
-     * @param params HTTP parameters (required).
-     * 
-     * @deprecated (4.3) use {@link HttpAsyncService#HttpAsyncService(HttpProcessor,
-     *  ConnectionReuseStrategy, HttpAsyncRequestHandlerMapper, HttpParams)}
+     * @param httpProcessor HTTP protocol processor.
+     * @param handlerMapper Request handler mapper.
+     *
+     * @since 4.3
      */
-    @Deprecated
     public HttpAsyncService(
             final HttpProcessor httpProcessor,
-            final ConnectionReuseStrategy connStrategy,
-            final HttpAsyncRequestHandlerResolver handlerResolver,
-            final HttpParams params) {
-        this(httpProcessor,
-             connStrategy,
-             DefaultHttpResponseFactory.INSTANCE,
-             new HttpAsyncRequestHandlerResolverAdapter(handlerResolver),
-             null,
-             params);
+            final HttpAsyncRequestHandlerMapper handlerMapper) {
+        this(httpProcessor, null, null, handlerMapper, null);
     }
 
     public void connected(final NHttpServerConnection conn) {
@@ -292,7 +271,6 @@ public class HttpAsyncService implements
         }
         HttpRequest request = conn.getHttpRequest();
         HttpContext context = state.getContext();
-        request.setParams(new DefaultedHttpParams(request.getParams(), this.params));
 
         context.setAttribute(ExecutionContext.HTTP_REQUEST, request);
         context.setAttribute(ExecutionContext.HTTP_CONNECTION, conn);
@@ -405,7 +383,6 @@ public class HttpAsyncService implements
             }
             closeHandlers(state);
             state.reset();
-            conn.setSocketTimeout(Config.getInt(this.params, CoreConnectionPNames.SO_TIMEOUT, 0));
         }
     }
 
@@ -587,7 +564,6 @@ public class HttpAsyncService implements
         HttpRequest request = state.getRequest();
         HttpResponse response = state.getResponse();
 
-        response.setParams(new DefaultedHttpParams(response.getParams(), this.params));
         context.setAttribute(ExecutionContext.HTTP_RESPONSE, response);
         this.httpProcessor.process(response, context);
 
@@ -610,7 +586,6 @@ public class HttpAsyncService implements
             }
             closeHandlers(state);
             state.reset();
-            conn.setSocketTimeout(Config.getInt(this.params, CoreConnectionPNames.SO_TIMEOUT, 0));
         } else {
             state.setResponseState(MessageState.BODY_STREAM);
         }
@@ -843,9 +818,9 @@ public class HttpAsyncService implements
      */
     @Deprecated
     private static class HttpAsyncRequestHandlerResolverAdapter implements HttpAsyncRequestHandlerMapper {
-        
+
         private final HttpAsyncRequestHandlerResolver resolver;
-        
+
         public HttpAsyncRequestHandlerResolverAdapter(final HttpAsyncRequestHandlerResolver resolver) {
             this.resolver = resolver;
         }
@@ -853,7 +828,7 @@ public class HttpAsyncService implements
         public HttpAsyncRequestHandler<?> lookup(HttpRequest request) {
             return resolver.lookup(request.getRequestLine().getUri());
         }
-        
+
     }
 
 }

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/impl/nio/reactor/TestBaseIOReactorSSL.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/impl/nio/reactor/TestBaseIOReactorSSL.java?rev=1394997&r1=1394996&r2=1394997&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/impl/nio/reactor/TestBaseIOReactorSSL.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/impl/nio/reactor/TestBaseIOReactorSSL.java Sat Oct  6 11:05:18 2012
@@ -51,6 +51,7 @@ import org.apache.http.nio.NHttpServiceH
 import org.apache.http.nio.protocol.BufferingHttpServiceHandler;
 import org.apache.http.nio.protocol.EventListener;
 import org.apache.http.nio.reactor.ListenerEndpoint;
+import org.apache.http.params.BasicHttpParams;
 import org.apache.http.protocol.HttpContext;
 import org.apache.http.protocol.HttpExpectationVerifier;
 import org.apache.http.protocol.HttpRequestHandler;
@@ -95,7 +96,7 @@ public class TestBaseIOReactorSSL extend
                 this.serverHttpProc,
                 DefaultHttpResponseFactory.INSTANCE,
                 DefaultConnectionReuseStrategy.INSTANCE,
-                this.serverParams);
+                new BasicHttpParams());
 
         serviceHandler.setHandlerResolver(
                 new SimpleHttpRequestHandlerResolver(requestHandler));

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/impl/nio/reactor/TestDefaultIOReactors.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/impl/nio/reactor/TestDefaultIOReactors.java?rev=1394997&r1=1394996&r2=1394997&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/impl/nio/reactor/TestDefaultIOReactors.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/impl/nio/reactor/TestDefaultIOReactors.java Sat Oct  6 11:05:18 2012
@@ -42,7 +42,6 @@ import org.apache.http.HttpHost;
 import org.apache.http.HttpRequest;
 import org.apache.http.HttpResponse;
 import org.apache.http.OoopsieRuntimeException;
-import org.apache.http.impl.DefaultConnectionReuseStrategy;
 import org.apache.http.impl.nio.DefaultNHttpClientConnection;
 import org.apache.http.impl.nio.DefaultNHttpServerConnection;
 import org.apache.http.impl.nio.pool.BasicNIOPoolEntry;
@@ -111,11 +110,7 @@ public class TestDefaultIOReactors exten
         this.connpool.setMaxTotal(connNo);
 
         UriHttpAsyncRequestHandlerMapper registry = new UriHttpAsyncRequestHandlerMapper();
-        HttpAsyncService serviceHandler = new HttpAsyncService(
-                this.serverHttpProc,
-                DefaultConnectionReuseStrategy.INSTANCE,
-                registry,
-                this.serverParams) {
+        HttpAsyncService serviceHandler = new HttpAsyncService(this.serverHttpProc, registry) {
 
             @Override
             public void connected(final NHttpServerConnection conn) {
@@ -197,11 +192,7 @@ public class TestDefaultIOReactors exten
 
         UriHttpAsyncRequestHandlerMapper registry = new UriHttpAsyncRequestHandlerMapper();
         registry.register("*", new BasicAsyncRequestHandler(requestHandler));
-        HttpAsyncService serviceHandler = new HttpAsyncService(
-                this.serverHttpProc,
-                DefaultConnectionReuseStrategy.INSTANCE,
-                registry,
-                this.serverParams) {
+        HttpAsyncService serviceHandler = new HttpAsyncService(this.serverHttpProc, registry) {
 
                     @Override
                     public void exception(
@@ -280,11 +271,7 @@ public class TestDefaultIOReactors exten
 
         UriHttpAsyncRequestHandlerMapper registry = new UriHttpAsyncRequestHandlerMapper();
         registry.register("*", new BasicAsyncRequestHandler(requestHandler));
-        HttpAsyncService serviceHandler = new HttpAsyncService(
-                this.serverHttpProc,
-                DefaultConnectionReuseStrategy.INSTANCE,
-                registry,
-                this.serverParams) {
+        HttpAsyncService serviceHandler = new HttpAsyncService(this.serverHttpProc, registry) {
 
             @Override
             public void exception(
@@ -364,11 +351,7 @@ public class TestDefaultIOReactors exten
 
         UriHttpAsyncRequestHandlerMapper registry = new UriHttpAsyncRequestHandlerMapper();
         registry.register("*", new BasicAsyncRequestHandler(requestHandler));
-        HttpAsyncService serviceHandler = new HttpAsyncService(
-                this.serverHttpProc,
-                DefaultConnectionReuseStrategy.INSTANCE,
-                registry,
-                this.serverParams) {
+        HttpAsyncService serviceHandler = new HttpAsyncService(this.serverHttpProc, registry) {
 
             @Override
             public void exception(

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/impl/nio/reactor/TestDefaultListeningIOReactor.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/impl/nio/reactor/TestDefaultListeningIOReactor.java?rev=1394997&r1=1394996&r2=1394997&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/impl/nio/reactor/TestDefaultListeningIOReactor.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/impl/nio/reactor/TestDefaultListeningIOReactor.java Sat Oct  6 11:05:18 2012
@@ -35,7 +35,6 @@ import java.util.concurrent.CountDownLat
 import java.util.concurrent.TimeUnit;
 
 import org.apache.http.HttpResponseInterceptor;
-import org.apache.http.impl.DefaultConnectionReuseStrategy;
 import org.apache.http.impl.nio.DefaultHttpServerIODispatch;
 import org.apache.http.nio.protocol.HttpAsyncService;
 import org.apache.http.nio.protocol.UriHttpAsyncRequestHandlerMapper;
@@ -44,8 +43,6 @@ import org.apache.http.nio.reactor.IORea
 import org.apache.http.nio.reactor.IOReactorStatus;
 import org.apache.http.nio.reactor.ListenerEndpoint;
 import org.apache.http.nio.reactor.ListeningIOReactor;
-import org.apache.http.params.BasicHttpParams;
-import org.apache.http.params.HttpParams;
 import org.apache.http.protocol.HttpProcessor;
 import org.apache.http.protocol.ImmutableHttpProcessor;
 import org.apache.http.protocol.ResponseConnControl;
@@ -61,18 +58,14 @@ import org.junit.Test;
 public class TestDefaultListeningIOReactor {
 
     private static IOEventDispatch createIOEventDispatch() {
-        HttpParams params = new BasicHttpParams();
         HttpProcessor httpproc = new ImmutableHttpProcessor(new HttpResponseInterceptor[] {
                 new ResponseDate(),
                 new ResponseServer(),
                 new ResponseContent(),
                 new ResponseConnControl()
         });
-        HttpAsyncService serviceHandler = new HttpAsyncService(
-                httpproc,
-                DefaultConnectionReuseStrategy.INSTANCE,
-                new UriHttpAsyncRequestHandlerMapper(),
-                params);
+        HttpAsyncService serviceHandler = new HttpAsyncService(httpproc,
+                new UriHttpAsyncRequestHandlerMapper());
         return new DefaultHttpServerIODispatch(serviceHandler);
     }
 

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestAsyncNHttpHandlers.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestAsyncNHttpHandlers.java?rev=1394997&r1=1394996&r2=1394997&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestAsyncNHttpHandlers.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestAsyncNHttpHandlers.java Sat Oct  6 11:05:18 2012
@@ -61,7 +61,9 @@ import org.apache.http.nio.protocol.Simp
 import org.apache.http.nio.reactor.IOReactorStatus;
 import org.apache.http.nio.reactor.ListenerEndpoint;
 import org.apache.http.nio.reactor.SessionRequest;
+import org.apache.http.params.BasicHttpParams;
 import org.apache.http.params.CoreProtocolPNames;
+import org.apache.http.params.HttpParams;
 import org.apache.http.protocol.HttpContext;
 import org.apache.http.protocol.HttpExpectationVerifier;
 import org.apache.http.protocol.HttpProcessor;
@@ -92,10 +94,13 @@ import org.junit.Test;
 @Deprecated
 public class TestAsyncNHttpHandlers extends HttpCoreNIOTestBase {
 
+    private HttpParams params;
+
     @Before
     public void setUp() throws Exception {
         initServer();
         initClient();
+        params = new BasicHttpParams();
     }
 
     @After
@@ -132,7 +137,7 @@ public class TestAsyncNHttpHandlers exte
                 this.serverHttpProc,
                 DefaultHttpResponseFactory.INSTANCE,
                 DefaultConnectionReuseStrategy.INSTANCE,
-                this.serverParams);
+                this.params);
 
         serviceHandler.setHandlerResolver(
                 new SimpleNHttpRequestHandlerResolver(requestHandler));
@@ -143,7 +148,7 @@ public class TestAsyncNHttpHandlers exte
                 this.clientHttpProc,
                 requestExecutionHandler,
                 DefaultConnectionReuseStrategy.INSTANCE,
-                this.clientParams);
+                this.params);
 
         clientHandler.setEventListener(
                 new SimpleEventListener());
@@ -376,7 +381,7 @@ public class TestAsyncNHttpHandlers exte
                 serverHttpProc,
                 DefaultHttpResponseFactory.INSTANCE,
                 DefaultConnectionReuseStrategy.INSTANCE,
-                this.serverParams);
+                this.params);
 
         serviceHandler.setHandlerResolver(
                 new SimpleNHttpRequestHandlerResolver(new RequestHandler()));
@@ -396,7 +401,7 @@ public class TestAsyncNHttpHandlers exte
                 clientHttpProc,
                 requestExecutionHandler,
                 DefaultConnectionReuseStrategy.INSTANCE,
-                this.clientParams);
+                this.params);
 
         clientHandler.setEventListener(new SimpleEventListener());
 
@@ -473,7 +478,7 @@ public class TestAsyncNHttpHandlers exte
                 serverHttpProc,
                 DefaultHttpResponseFactory.INSTANCE,
                 DefaultConnectionReuseStrategy.INSTANCE,
-                this.serverParams);
+                this.params);
 
         serviceHandler.setHandlerResolver(
                 new SimpleNHttpRequestHandlerResolver(new RequestHandler()));
@@ -491,7 +496,7 @@ public class TestAsyncNHttpHandlers exte
                 clientHttpProc,
                 requestExecutionHandler,
                 DefaultConnectionReuseStrategy.INSTANCE,
-                this.clientParams);
+                this.params);
 
         clientHandler.setEventListener(new SimpleEventListener());
 
@@ -654,7 +659,7 @@ public class TestAsyncNHttpHandlers exte
                 serverHttpProc,
                 DefaultHttpResponseFactory.INSTANCE,
                 DefaultConnectionReuseStrategy.INSTANCE,
-                this.serverParams);
+                this.params);
 
         serviceHandler.setHandlerResolver(
                 new SimpleNHttpRequestHandlerResolver(requestHandler));
@@ -672,7 +677,7 @@ public class TestAsyncNHttpHandlers exte
                 clientHttpProc,
                 requestExecutionHandler,
                 DefaultConnectionReuseStrategy.INSTANCE,
-                this.clientParams);
+                this.params);
 
         clientHandler.setEventListener(new SimpleEventListener());
 
@@ -776,7 +781,7 @@ public class TestAsyncNHttpHandlers exte
                 serverHttpProc,
                 DefaultHttpResponseFactory.INSTANCE,
                 DefaultConnectionReuseStrategy.INSTANCE,
-                this.serverParams);
+                this.params);
 
         serviceHandler.setHandlerResolver(
                 new SimpleNHttpRequestHandlerResolver(requestHandler));
@@ -794,7 +799,7 @@ public class TestAsyncNHttpHandlers exte
                 clientHttpProc,
                 requestExecutionHandler,
                 DefaultConnectionReuseStrategy.INSTANCE,
-                this.clientParams);
+                this.params);
 
         clientHandler.setEventListener(new SimpleEventListener());
 
@@ -874,7 +879,7 @@ public class TestAsyncNHttpHandlers exte
                 serverHttpProc,
                 DefaultHttpResponseFactory.INSTANCE,
                 DefaultConnectionReuseStrategy.INSTANCE,
-                this.serverParams);
+                this.params);
 
         serviceHandler.setEventListener(
                 new SimpleEventListener());
@@ -890,7 +895,7 @@ public class TestAsyncNHttpHandlers exte
                 clientHttpProc,
                 requestExecutionHandler,
                 DefaultConnectionReuseStrategy.INSTANCE,
-                this.clientParams);
+                this.params);
 
         clientHandler.setEventListener(new SimpleEventListener());
 
@@ -976,7 +981,7 @@ public class TestAsyncNHttpHandlers exte
                 serverHttpProc,
                 DefaultHttpResponseFactory.INSTANCE,
                 DefaultConnectionReuseStrategy.INSTANCE,
-                this.serverParams);
+                this.params);
 
         serviceHandler.setHandlerResolver(
                 new SimpleNHttpRequestHandlerResolver(new RequestHandler()));
@@ -994,7 +999,7 @@ public class TestAsyncNHttpHandlers exte
                 clientHttpProc,
                 requestExecutionHandler,
                 DefaultConnectionReuseStrategy.INSTANCE,
-                this.clientParams);
+                this.params);
 
         clientHandler.setEventListener(new SimpleEventListener());
 
@@ -1075,7 +1080,7 @@ public class TestAsyncNHttpHandlers exte
                 serverHttpProc,
                 DefaultHttpResponseFactory.INSTANCE,
                 DefaultConnectionReuseStrategy.INSTANCE,
-                this.serverParams);
+                this.params);
 
         serviceHandler.setHandlerResolver(
                 new SimpleNHttpRequestHandlerResolver(null));
@@ -1093,7 +1098,7 @@ public class TestAsyncNHttpHandlers exte
                 clientHttpProc,
                 requestExecutionHandler,
                 DefaultConnectionReuseStrategy.INSTANCE,
-                this.clientParams);
+                this.params);
 
         clientHandler.setEventListener(new SimpleEventListener());
 

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestHttpAsyncHandlerCancellable.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestHttpAsyncHandlerCancellable.java?rev=1394997&r1=1394996&r2=1394997&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestHttpAsyncHandlerCancellable.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestHttpAsyncHandlerCancellable.java Sat Oct  6 11:05:18 2012
@@ -43,8 +43,6 @@ import org.apache.http.HttpVersion;
 import org.apache.http.concurrent.Cancellable;
 import org.apache.http.entity.BasicHttpEntity;
 import org.apache.http.entity.ContentType;
-import org.apache.http.impl.DefaultConnectionReuseStrategy;
-import org.apache.http.impl.DefaultHttpResponseFactory;
 import org.apache.http.impl.nio.DefaultNHttpClientConnection;
 import org.apache.http.impl.nio.DefaultNHttpServerConnection;
 import org.apache.http.message.BasicHttpResponse;
@@ -142,13 +140,7 @@ public class TestHttpAsyncHandlerCancell
             }
             
         });
-        HttpAsyncService serviceHandler = new HttpAsyncService(
-                this.serverHttpProc,
-                DefaultConnectionReuseStrategy.INSTANCE,
-                DefaultHttpResponseFactory.INSTANCE,
-                registry,
-                null,
-                this.serverParams);
+        HttpAsyncService serviceHandler = new HttpAsyncService(this.serverHttpProc, registry);
         this.server.start(serviceHandler);
 
         ListenerEndpoint endpoint = this.server.getListenerEndpoint();
@@ -206,13 +198,7 @@ public class TestHttpAsyncHandlerCancell
             }
             
         });
-        HttpAsyncService serviceHandler = new HttpAsyncService(
-                this.serverHttpProc,
-                DefaultConnectionReuseStrategy.INSTANCE,
-                DefaultHttpResponseFactory.INSTANCE,
-                registry,
-                null,
-                this.serverParams);
+        HttpAsyncService serviceHandler = new HttpAsyncService(this.serverHttpProc, registry);
         this.server.start(serviceHandler);
 
         ListenerEndpoint endpoint = this.server.getListenerEndpoint();



Mime
View raw message