hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rola...@apache.org
Subject svn commit: r451607 - in /jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http: HttpRequestInterceptor.java HttpResponseInterceptor.java io/package.html protocol/HttpProcessor.java
Date Sat, 30 Sep 2006 15:29:57 GMT
Author: rolandw
Date: Sat Sep 30 08:29:56 2006
New Revision: 451607

URL: http://svn.apache.org/viewvc?view=rev&rev=451607
Log:
HttpProcessor extends the interceptors. Plus a JavaDoc fix.

Modified:
    jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/HttpRequestInterceptor.java
    jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/HttpResponseInterceptor.java
    jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/io/package.html
    jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/protocol/HttpProcessor.java

Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/HttpRequestInterceptor.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/HttpRequestInterceptor.java?view=diff&rev=451607&r1=451606&r2=451607
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/HttpRequestInterceptor.java
(original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/HttpRequestInterceptor.java
Sat Sep 30 08:29:56 2006
@@ -33,18 +33,34 @@
 
 import org.apache.http.protocol.HttpContext;
 
+
 /**
- * <p>Provides the possibility to preprocess a request before it is sent
- *  to the server or after it has received on the server side.
- * </p>
+ * Processes a request.
+ * Provides the ability to process a request before it is sent
+ * to the server or after it has received on the server side.
+ *
  * @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
  *
+ *
+ * <!-- empty lines above to avoid 'svn diff' context problems -->
  * @version $Revision$
  * 
  * @since 4.0
  */
 public interface HttpRequestInterceptor {
 
+    /**
+     * Processes a request.
+     * On the client side, this step is performed before the request is
+     * sent to the server. On the server side, this step is performed
+     * on incoming messages before the message body is evaluated.
+     *
+     * @param request   the request to preprocess
+     * @param context   the context for the request
+     *
+     * @throws IOException      in case of an IO problem
+     * @throws HttpException    in case of a protocol or other problem
+     */
     void process(HttpRequest request, HttpContext context) 
         throws HttpException, IOException;
     

Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/HttpResponseInterceptor.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/HttpResponseInterceptor.java?view=diff&rev=451607&r1=451606&r2=451607
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/HttpResponseInterceptor.java
(original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/HttpResponseInterceptor.java
Sat Sep 30 08:29:56 2006
@@ -34,18 +34,33 @@
 import org.apache.http.protocol.HttpContext;
 
 /**
- * <p>Provides the possibility to postprocess a response before it is sent
+ * Processes a response.
+ * Provides the ability to process a response before it is sent
  * to the client or after it has been received on the client side.
- * </p>
+ *
  * @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
  *
+ *
+ * <!-- empty lines above to avoid 'svn diff' context problems -->
  * @version $Revision$
  * 
  * @since 4.0
  */
 public interface HttpResponseInterceptor {
 
+    /**
+     * Processes a response.
+     * On the server side, this step is performed before the response is
+     * sent to the client. On the client side, this step is performed
+     * on incoming messages before the message body is evaluated.
+     *
+     * @param response  the response to postprocess
+     * @param context   the context for the request
+     *
+     * @throws IOException      in case of an IO problem
+     * @throws HttpException    in case of a protocol or other problem
+     */
     void process(HttpResponse response, HttpContext context) 
         throws HttpException, IOException;
-    
+
 }

Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/io/package.html
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/io/package.html?view=diff&rev=451607&r1=451606&r2=451607
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/io/package.html
(original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/io/package.html
Sat Sep 30 08:29:56 2006
@@ -34,14 +34,12 @@
 <body>
 The transport layer abstraction of the HTTP components.
 
-This layer is used to transfer messages over sockets.
-Sockets are always created through a
-{@link org.apache.http.io.SocketFactory factory}.
-You can provide factories to create plain sockets,
-{@link org.apache.http.io.SecureSocketFactory secure} sockets
-based on SSL/TLS, sockets that connect over SOCKS hosts,
-sockets that implement bandwidth throttling,
-or whatever else you might think of.
+This layer is used to transfer messages over connections.
+Connections are typically based on sockets: plain or secure,
+direct or via SOCKS hosts, with bandwidth throttling, or
+whatever else you might think of.
+However, opening connections is not within the responsibility
+of HttpCore.
 
 <br/>
 

Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/protocol/HttpProcessor.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/protocol/HttpProcessor.java?view=diff&rev=451607&r1=451606&r2=451607
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/protocol/HttpProcessor.java
(original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/protocol/HttpProcessor.java
Sat Sep 30 08:29:56 2006
@@ -33,10 +33,18 @@
 
 import org.apache.http.HttpException;
 import org.apache.http.HttpRequest;
+import org.apache.http.HttpRequestInterceptor;
 import org.apache.http.HttpResponse;
+import org.apache.http.HttpResponseInterceptor;
+
 
 /**
  * Performs interceptor processing of requests and responses.
+ * Specific interceptors typically interpret or update message headers,
+ * and they may wrap the message entity for example to implement a
+ * specific transport or content encoding.
+ * A <code>HttpProcessor</code> typically maintains a list of
+ * interceptors that will be applied to a request or response.
  *
  * @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
  * @author <a href="mailto:rolandw at apache.org">Roland Weber</a>
@@ -45,39 +53,8 @@
  * 
  * @since 4.0
  */
-public interface HttpProcessor {
-
-    /**
-     * Processes a request.
-     * On the client side, this step is performed before the request is
-     * sent to the server. On the server side, this step is performed
-     * on incoming messages before the message body is evaluated.
-     *
-     * @param request   the request to preprocess
-     * @param context   the context for the request
-     *
-     * @throws IOException      in case of an IO problem
-     * @throws HttpException    in case of a protocol or other problem
-     */
-    void process(HttpRequest request, HttpContext context) 
-        throws IOException, HttpException
-        ;
-
-
-    /**
-     * Processes a request.
-     * On the client side, this step is performed before the request is
-     * sent to the server. On the server side, this step is performed
-     * on incoming messages before the message body is evaluated.
-     *
-     * @param response  the response to postprocess
-     * @param context   the context for the request
-     *
-     * @throws IOException      in case of an IO problem
-     * @throws HttpException    in case of a protocol or other problem
-     */
-    void process(HttpResponse response, HttpContext context)
-        throws IOException, HttpException
-        ;
+public interface HttpProcessor
+    extends HttpRequestInterceptor, HttpResponseInterceptor {
 
+    // no additional methods
 }



Mime
View raw message