HttpCore 4.2-alpha2 RC1 tag
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpcore/tags/4.2-alpha2-RC1@1172292 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpClient.java b/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpClient.java
index 1995f10..816e838 100644
--- a/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpClient.java
+++ b/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpClient.java
@@ -38,6 +38,7 @@
import org.apache.http.impl.nio.DefaultClientIODispatch;
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;
@@ -85,7 +86,9 @@
// Create client-side I/O event dispatch
final IOEventDispatch ioEventDispatch = new DefaultClientIODispatch(protocolHandler, params);
// Create client-side I/O reactor
- final ConnectingIOReactor ioReactor = new DefaultConnectingIOReactor();
+ IOReactorConfig config = new IOReactorConfig();
+ config.setIoThreadCount(1);
+ final ConnectingIOReactor ioReactor = new DefaultConnectingIOReactor(config);
// Create HTTP connection pool
BasicNIOConnPool pool = new BasicNIOConnPool(ioReactor, params);
// Limit total number of connections to just two
diff --git a/src/site/apt/examples.apt b/src/site/apt/examples.apt
index 1c3e7fa..38d14a4 100644
--- a/src/site/apt/examples.apt
+++ b/src/site/apt/examples.apt
@@ -30,34 +30,33 @@
HttpCore Examples
- * {{{./httpcore/examples/org/apache/http/examples/ElementalHttpGet.java}Basic HTTP GET}}
+ * {{{./httpcore/examples/org/apache/http/examples/ElementalHttpGet.java} Basic HTTP GET}}
- This example demonstrates how to execute a series of simple HTTP GET requests.
+ This example demonstrates how to execute a series of synchronous (blocking) HTTP GET requests.
- * {{{./httpcore/examples/org/apache/http/examples/ElementalHttpPost.java}Basic HTTP POST}}
+ * {{{./httpcore/examples/org/apache/http/examples/ElementalHttpPost.java} Basic HTTP POST}}
- This example demonstrates how to execute a series of simple HTTP POST requests that enclose entity
- content of various types: a string, a byte array, an arbitrary input stream.
+ This example demonstrates how to execute a series of synchronous (blocking) HTTP POST requests
+ that enclose entity content of various types: a string, a byte array, an arbitrary input stream.
- * {{{./httpcore/examples/org/apache/http/examples/ElementalHttpServer.java}Basic HTTP server}}
+ * {{{./httpcore/examples/org/apache/http/examples/ElementalHttpServer.java} Basic HTTP server}}
- This is an example of a simple but fully functional HTTP/1.1 server written with only a few dozen
- lines of Java code.
+ This is an example of an HTTP/1.1 file server based on a synchronous (blocking) I/O model.
- * {{{./httpcore-nio/examples/org/apache/http/examples/nio/NHttpServer.java}Basic non-blocking HTTP server}}
+ * {{{./httpcore-nio/examples/org/apache/http/examples/nio/NHttpClient.java} Asynchronous HTTP GET}}
- This example demonstrates the use of HttpCore NIO extensions to build a non-blocking HTTP/1.1 server.
+ This example demonstrates how HttpCore NIO can be used to execute multiple HTTP GET requests
+ asynchronously using only one I/O thread.
- * {{{./httpcore-nio/examples/org/apache/http/examples/nio/NHttpClient.java}Basic non-blocking HTTP client}}
+ * {{{./httpcore-nio/examples/org/apache/http/examples/nio/NHttpServer.java} Asynchronous HTTP
+ server}}
- This example demonstrates how HttpCore NIO can be used to execute multiple HTTP requests using
- only one I/O thread.
+ This example demonstrates the use of HttpCore NIO to build an asynchronous (non-blocking)
+ HTTP server capable of direct channel (zero copy) data transfer.
- * {{{./httpcore-nio/examples/org/apache/http/examples/nio/NHttpClientConnManagement.java}Management of non-blocking client connections}}
+ * {{{./httpcore-nio/examples/org/apache/http/examples/nio/NHttpReverseProxy.java} Asynchronous
+ HTTP reverse proxy}}
- This example demonstrates how to manage reuse of persistent client connections using HttpCore NIO.
-
- * {{{./httpcore-nio/examples/org/apache/http/examples/nio/NHttpSSLServer.java}Basic non-blocking HTTPS server}}
-
- This example demonstrates the use of HttpCore NIO extensions to build a non-blocking HTTPS/1.1 server.
-
+ This example demonstrates how HttpCore NIO can be used to build an asynchronous, fully
+ streaming reverse HTTP proxy.
+