Return-Path: X-Original-To: apmail-hc-commits-archive@www.apache.org Delivered-To: apmail-hc-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 92063D459 for ; Fri, 15 Mar 2013 17:09:37 +0000 (UTC) Received: (qmail 54172 invoked by uid 500); 15 Mar 2013 17:09:37 -0000 Delivered-To: apmail-hc-commits-archive@hc.apache.org Received: (qmail 54115 invoked by uid 500); 15 Mar 2013 17:09:37 -0000 Mailing-List: contact commits-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list commits@hc.apache.org Received: (qmail 54107 invoked by uid 99); 15 Mar 2013 17:09:36 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Mar 2013 17:09:36 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Mar 2013 17:09:34 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 114D12388847 for ; Fri, 15 Mar 2013 17:07:28 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@hc.apache.org From: olegk@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130315170728.114D12388847@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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 the result type of request execution. * @since 4.2 + * + * @deprecated use {@link HttpAsyncClientExchangeHandler} */ @Deprecated public interface HttpAsyncRequestExecutionHandler 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();