hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1457020 - in /httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol: HttpAsyncClientExchangeHandler.java HttpAsyncRequestExecutionHandler.java HttpAsyncRequestExecutor.java
Date Fri, 15 Mar 2013 17:07:27 GMT
Author: olegk
Date: Fri Mar 15 17:07:27 2013
New Revision: 1457020

URL: http://svn.apache.org/r1457020
Log:
Propagate I/O exceptions from input events in HttpAsyncClientExchangeHandler

Modified:
    httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncClientExchangeHandler.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncRequestExecutionHandler.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncRequestExecutor.java

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncClientExchangeHandler.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncClientExchangeHandler.java?rev=1457020&r1=1457019&r2=1457020&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncClientExchangeHandler.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncClientExchangeHandler.java
Fri Mar 15 17:07:27 2013
@@ -129,7 +129,7 @@ public interface HttpAsyncClientExchange
     /**
      * Invoked to signal that the response has been fully processed.
      */
-    void responseCompleted();
+    void responseCompleted() throws IOException, HttpException;
 
     /**
      * Determines if current connection can be kept alive after the given HTTP response.

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncRequestExecutionHandler.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncRequestExecutionHandler.java?rev=1457020&r1=1457019&r2=1457020&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncRequestExecutionHandler.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncRequestExecutionHandler.java
Fri Mar 15 17:07:27 2013
@@ -39,6 +39,8 @@ import org.apache.http.protocol.HttpProc
  *
  * @param <T> the result type of request execution.
  * @since 4.2
+ *
+ * @deprecated use {@link HttpAsyncClientExchangeHandler}
  */
 @Deprecated
 public interface HttpAsyncRequestExecutionHandler<T>

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=1457020&r1=1457019&r2=1457020&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
Fri Mar 15 17:07:27 2013
@@ -166,7 +166,7 @@ public class HttpAsyncRequestExecutor im
 
     public void outputReady(
             final NHttpClientConnection conn,
-            final ContentEncoder encoder) throws IOException {
+            final ContentEncoder encoder) throws IOException, HttpException {
         final State state = ensureNotNull(getState(conn));
         final HttpAsyncClientExchangeHandler handler = ensureNotNull(getHandler(conn));
         if (state.getRequestState() == MessageState.ACK_EXPECTED) {
@@ -229,7 +229,7 @@ public class HttpAsyncRequestExecutor im
 
     public void inputReady(
             final NHttpClientConnection conn,
-            final ContentDecoder decoder) throws IOException {
+            final ContentDecoder decoder) throws IOException, HttpException {
         final State state = ensureNotNull(getState(conn));
         final HttpAsyncClientExchangeHandler handler = ensureNotNull(getHandler(conn));
         handler.consumeContent(decoder, conn);
@@ -245,7 +245,7 @@ public class HttpAsyncRequestExecutor im
             if (state.getRequestState().compareTo(MessageState.READY) != 0) {
                 state.invalidate();
             }
-            HttpAsyncClientExchangeHandler handler = getHandler(conn);
+            final HttpAsyncClientExchangeHandler handler = getHandler(conn);
             if (handler != null) {
                 if (state.isValid()) {
                     handler.inputTerminated();
@@ -276,7 +276,7 @@ public class HttpAsyncRequestExecutor im
                 return;
             } else {
                 state.invalidate();
-                HttpAsyncClientExchangeHandler handler = getHandler(conn);
+                final HttpAsyncClientExchangeHandler handler = getHandler(conn);
                 if (handler != null) {
                     handler.failed(new SocketTimeoutException());
                     handler.close();
@@ -343,7 +343,7 @@ public class HttpAsyncRequestExecutor im
     private void processResponse(
             final NHttpClientConnection conn,
             final State state,
-            final HttpAsyncClientExchangeHandler handler) throws IOException {
+            final HttpAsyncClientExchangeHandler handler) throws IOException, HttpException
{
         if (state.isValid()) {
             final HttpRequest request = state.getRequest();
             final HttpResponse response = state.getResponse();



Mime
View raw message