hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r719844 - in /httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/protocol: AsyncNHttpClientHandler.java AsyncNHttpServiceHandler.java
Date Sat, 22 Nov 2008 13:02:42 GMT
Author: olegk
Date: Sat Nov 22 05:02:41 2008
New Revision: 719844

URL: http://svn.apache.org/viewvc?rev=719844&view=rev
Log:
javadoc updates

Modified:
    httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/protocol/AsyncNHttpClientHandler.java
    httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/protocol/AsyncNHttpServiceHandler.java

Modified: httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/protocol/AsyncNHttpClientHandler.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/protocol/AsyncNHttpClientHandler.java?rev=719844&r1=719843&r2=719844&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/protocol/AsyncNHttpClientHandler.java
(original)
+++ httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/protocol/AsyncNHttpClientHandler.java
Sat Nov 22 05:02:41 2008
@@ -59,15 +59,36 @@
 import org.apache.http.protocol.HttpProcessor;
 
 /**
- * HTTP client handler implementation that asynchronously reads & writes out the
- * content of messages.
+ * Fully asynchronous HTTP client side protocol handler that implements the 
+ * essential requirements of the HTTP protocol for the server side message 
+ * processing as described by RFC 2616. It is capable of executing HTTP requests 
+ * with nearly constant memory footprint. Only HTTP message heads are stored in 
+ * memory, while content of message bodies is streamed directly from the entity 
+ * to the underlying channel (and vice versa) using {@link ConsumingNHttpEntity}
+ * and {@link ProducingNHttpEntity} interfaces.
+ * 
+ * When using this implementation, it is important to ensure that entities 
+ * supplied for writing implement !ProducingNHttpEntity. Doing so will allow 
+ * the entity to be written out asynchronously. If entities supplied for writing 
+ * do not implement the {@link ProducingNHttpEntity} interface, a delegate is 
+ * added that buffers the entire contents in memory. Additionally, the 
+ * buffering might take place in the I/O dispatch thread, which could cause I/O 
+ * to block temporarily. For best results, one must ensure that all entities 
+ * set on {@link HttpRequest}s from {@link NHttpRequestExecutionHandler} 
+ * implement {@link ProducingNHttpEntity}.
+ * 
+ * If incoming responses enclose a content entity, 
+ * {@link NHttpRequestExecutionHandler} are expected to return a 
+ * {@link ConsumingNHttpEntity} for reading the content. After the entity is 
+ * finished reading the data, 
+ * {@link NHttpRequestExecutionHandler#handleResponse(HttpResponse, HttpContext)} 
+ * method is called to process the response. 
  *
  * @see ConsumingNHttpEntity
  * @see ProducingNHttpEntity
  *
  * @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
  * @author <a href="mailto:sberlin at gmail.com">Sam Berlin</a>
- *
  */
 public class AsyncNHttpClientHandler extends NHttpHandlerBase
                                      implements NHttpClientHandler {

Modified: httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/protocol/AsyncNHttpServiceHandler.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/protocol/AsyncNHttpServiceHandler.java?rev=719844&r1=719843&r2=719844&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/protocol/AsyncNHttpServiceHandler.java
(original)
+++ httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/protocol/AsyncNHttpServiceHandler.java
Sat Nov 22 05:02:41 2008
@@ -68,18 +68,21 @@
 import org.apache.http.util.EncodingUtils;
 
 /**
- * Fully asynchronous HTTP service handler implementation that works with
- * {@link ConsumingNHttpEntity} and {@link ProducingNHttpEntity}. The contents
- * of HTTP headers are stored in memory, HTTP entities are streamed directly
- * from the entities to the underlying channel (and vice versa).
+ * Fully asynchronous HTTP server side protocol handler implementation that 
+ * implements the essential requirements of the HTTP protocol for the server 
+ * side message processing as described by RFC 2616. It is capable of processing 
+ * HTTP requests with nearly constant memory footprint. Only HTTP message heads 
+ * are stored in memory, while content of message bodies is streamed directly 
+ * from the entity to the underlying channel (and vice versa) 
+ * {@link ConsumingNHttpEntity} and {@link ProducingNHttpEntity} interfaces.
  * <p/>
- * When using class, it is important to ensure that entities supplied for writing
- * implement {@link ProducingNHttpEntity}. Doing so will allow the entity to be 
- * written out asynchronously. If entities supplied for writing do not implement
- * {@link ProducingNHttpEntity}, a delegate is added that buffers the entire 
- * contents in memory. Additionally, the buffering might take place in the I/O 
- * thread, which could cause I/O to block temporarily. For best results, ensure 
- * that all entities set on {@link HttpResponse}s from  
+ * When using this class, it is important to ensure that entities supplied for 
+ * writing implement {@link ProducingNHttpEntity}. Doing so will allow the 
+ * entity to be written out asynchronously. If entities supplied for writing do 
+ * not implement {@link ProducingNHttpEntity}, a delegate is added that buffers 
+ * the entire contents in memory. Additionally, the buffering might take place 
+ * in the I/O thread, which could cause I/O to block temporarily. For best 
+ * results, ensure that all entities set on {@link HttpResponse}s from  
  * {@link NHttpRequestHandler}s implement {@link ProducingNHttpEntity}.
  * <p/>
  * If incoming requests enclose a content entity, {@link NHttpRequestHandler}s 
@@ -88,13 +91,16 @@
  * {@link NHttpRequestHandler#handle(HttpRequest, HttpResponse, NHttpResponseTrigger, HttpContext)}
  * is called to generate a response.
  * <p/>
- * Individual {@link NHttpRequestHandler} do not have to submit a response 
+ * Individual {@link NHttpRequestHandler}s do not have to submit a response 
  * immediately. They can defer transmission of the HTTP response back to the 
  * client without blocking the I/O thread and to delegate the processing the 
  * HTTP request to a worker thread. The worker thread in its turn can use an 
  * instance of {@link NHttpResponseTrigger} passed as a parameter to submit 
  * a response as at a later point of time once the response becomes available.
  *
+ * @see ConsumingNHttpEntity
+ * @see ProducingNHttpEntity
+ *
  * @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
  * @author <a href="mailto:sberlin at gmail.com">Sam Berlin</a>
  * @author Steffen Pingel



Mime
View raw message