hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1057597 - in /httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http: impl/nio/client/ nio/client/
Date Tue, 11 Jan 2011 12:01:16 GMT
Author: olegk
Date: Tue Jan 11 12:01:16 2011
New Revision: 1057597

URL: http://svn.apache.org/viewvc?rev=1057597&view=rev
Log:
Minor API tweaks

Modified:
    httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/BasicHttpAsyncResponseConsumer.java
    httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/DefaultAsyncRequestDirector.java
    httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/nio/client/HttpAsyncExchangeHandler.java
    httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/nio/client/HttpAsyncResponseConsumer.java

Modified: httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/BasicHttpAsyncResponseConsumer.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/BasicHttpAsyncResponseConsumer.java?rev=1057597&r1=1057596&r2=1057597&view=diff
==============================================================================
--- httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/BasicHttpAsyncResponseConsumer.java
(original)
+++ httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/BasicHttpAsyncResponseConsumer.java
Tue Jan 11 12:01:16 2011
@@ -124,10 +124,6 @@ public class BasicHttpAsyncResponseConsu
         releaseResources();
     }
 
-    public boolean isDone() {
-        return this.completed;
-    }
-
     public Exception getException() {
         return this.ex;
     }

Modified: httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/DefaultAsyncRequestDirector.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/DefaultAsyncRequestDirector.java?rev=1057597&r1=1057596&r2=1057597&view=diff
==============================================================================
--- httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/DefaultAsyncRequestDirector.java
(original)
+++ httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/DefaultAsyncRequestDirector.java
Tue Jan 11 12:01:16 2011
@@ -339,11 +339,9 @@ class DefaultAsyncRequestDirector<T> imp
 
             if (this.finalResponse != null) {
                 this.responseConsumer.responseCompleted();
-                if (this.responseConsumer.isDone()) {
-                    this.log.debug("Response processed");
-                    this.resultFuture.completed(this.responseConsumer.getResult());
-                    releaseResources();
-                }
+                this.log.debug("Response processed");
+                this.resultFuture.completed(this.responseConsumer.getResult());
+                releaseResources();
             } else {
                 if (this.followup != null) {
                     HttpRoute actualRoute = this.mainRequest.getRoute();
@@ -381,7 +379,7 @@ class DefaultAsyncRequestDirector<T> imp
     }
 
     public boolean isDone() {
-        return this.responseConsumer.isDone();
+        return this.resultFuture.isDone();
     }
 
     public T getResult() {

Modified: httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/nio/client/HttpAsyncExchangeHandler.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/nio/client/HttpAsyncExchangeHandler.java?rev=1057597&r1=1057596&r2=1057597&view=diff
==============================================================================
--- httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/nio/client/HttpAsyncExchangeHandler.java
(original)
+++ httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/nio/client/HttpAsyncExchangeHandler.java
Tue Jan 11 12:01:16 2011
@@ -31,6 +31,8 @@ import org.apache.http.HttpResponse;
 public interface HttpAsyncExchangeHandler<T>
     extends HttpAsyncRequestProducer, HttpAsyncResponseConsumer<T> {
 
+    boolean isDone();
+
     boolean keepAlive(HttpResponse response);
 
 }

Modified: httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/nio/client/HttpAsyncResponseConsumer.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/nio/client/HttpAsyncResponseConsumer.java?rev=1057597&r1=1057596&r2=1057597&view=diff
==============================================================================
--- httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/nio/client/HttpAsyncResponseConsumer.java
(original)
+++ httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/nio/client/HttpAsyncResponseConsumer.java
Tue Jan 11 12:01:16 2011
@@ -45,8 +45,6 @@ public interface HttpAsyncResponseConsum
 
     void cancel();
 
-    boolean isDone();
-
     T getResult();
 
 }



Mime
View raw message