hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1370178 - in /httpcomponents/httpcore/branches/4.2.x/httpcore-nio/src/examples/org/apache/http/examples/nio: NHttpClient.java NHttpReverseProxy.java NHttpServer.java
Date Tue, 07 Aug 2012 11:14:21 GMT
Author: olegk
Date: Tue Aug  7 11:14:20 2012
New Revision: 1370178

URL: http://svn.apache.org/viewvc?rev=1370178&view=rev
Log:
HTTPCORE-304: fixed i/o reactor configuration in HttpCore NIO examples

Modified:
    httpcomponents/httpcore/branches/4.2.x/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpClient.java
    httpcomponents/httpcore/branches/4.2.x/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpReverseProxy.java
    httpcomponents/httpcore/branches/4.2.x/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpServer.java

Modified: httpcomponents/httpcore/branches/4.2.x/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpClient.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.2.x/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpClient.java?rev=1370178&r1=1370177&r2=1370178&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.2.x/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpClient.java
(original)
+++ httpcomponents/httpcore/branches/4.2.x/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpClient.java
Tue Aug  7 11:14:20 2012
@@ -38,7 +38,6 @@ import org.apache.http.impl.DefaultConne
 import org.apache.http.impl.nio.DefaultHttpClientIODispatch;
 import org.apache.http.impl.nio.pool.BasicNIOConnPool;
 import org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor;
-import org.apache.http.impl.nio.reactor.IOReactorConfig;
 import org.apache.http.message.BasicHttpRequest;
 import org.apache.http.nio.protocol.BasicAsyncRequestProducer;
 import org.apache.http.nio.protocol.BasicAsyncResponseConsumer;
@@ -71,7 +70,6 @@ public class NHttpClient {
             .setIntParameter(CoreConnectionPNames.SO_TIMEOUT, 3000)
             .setIntParameter(CoreConnectionPNames.CONNECTION_TIMEOUT, 3000)
             .setIntParameter(CoreConnectionPNames.SOCKET_BUFFER_SIZE, 8 * 1024)
-            .setBooleanParameter(CoreConnectionPNames.TCP_NODELAY, true)
             .setParameter(CoreProtocolPNames.USER_AGENT, "Test/1.1");
         // Create HTTP protocol processing chain
         HttpProcessor httpproc = new ImmutableHttpProcessor(new HttpRequestInterceptor[]
{
@@ -86,9 +84,7 @@ public class NHttpClient {
         // Create client-side I/O event dispatch
         final IOEventDispatch ioEventDispatch = new DefaultHttpClientIODispatch(protocolHandler,
params);
         // Create client-side I/O reactor
-        IOReactorConfig config = new IOReactorConfig();
-        config.setIoThreadCount(1);
-        final ConnectingIOReactor ioReactor = new DefaultConnectingIOReactor(config);
+        final ConnectingIOReactor ioReactor = new DefaultConnectingIOReactor();
         // Create HTTP connection pool
         BasicNIOConnPool pool = new BasicNIOConnPool(ioReactor, params);
         // Limit total number of connections to just two

Modified: httpcomponents/httpcore/branches/4.2.x/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpReverseProxy.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.2.x/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpReverseProxy.java?rev=1370178&r1=1370177&r2=1370178&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.2.x/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpReverseProxy.java
(original)
+++ httpcomponents/httpcore/branches/4.2.x/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpReverseProxy.java
Tue Aug  7 11:14:20 2012
@@ -127,7 +127,6 @@ public class NHttpReverseProxy {
         params
             .setIntParameter(CoreConnectionPNames.SO_TIMEOUT, 30000)
             .setIntParameter(CoreConnectionPNames.SOCKET_BUFFER_SIZE, 8 * 1024)
-            .setBooleanParameter(CoreConnectionPNames.TCP_NODELAY, true)
             .setParameter(CoreProtocolPNames.ORIGIN_SERVER, "Test/1.1")
             .setParameter(CoreProtocolPNames.USER_AGENT, "Test/1.1");
 

Modified: httpcomponents/httpcore/branches/4.2.x/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpServer.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.2.x/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpServer.java?rev=1370178&r1=1370177&r2=1370178&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.2.x/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpServer.java
(original)
+++ httpcomponents/httpcore/branches/4.2.x/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpServer.java
Tue Aug  7 11:14:20 2012
@@ -101,7 +101,6 @@ public class NHttpServer {
         params
             .setIntParameter(CoreConnectionPNames.SO_TIMEOUT, 5000)
             .setIntParameter(CoreConnectionPNames.SOCKET_BUFFER_SIZE, 8 * 1024)
-            .setBooleanParameter(CoreConnectionPNames.TCP_NODELAY, true)
             .setParameter(CoreProtocolPNames.ORIGIN_SERVER, "HttpTest/1.1");
         // Create HTTP protocol processing chain
         HttpProcessor httpproc = new ImmutableHttpProcessor(new HttpResponseInterceptor[]
{



Mime
View raw message