tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1478358 - in /tomcat/trunk/java/org/apache/coyote/http11: AbstractOutputBuffer.java InternalAprOutputBuffer.java InternalNioOutputBuffer.java InternalOutputBuffer.java
Date Thu, 02 May 2013 13:03:53 GMT
Author: markt
Date: Thu May  2 13:03:52 2013
New Revision: 1478358

URL: http://svn.apache.org/r1478358
Log:
Implment a standard isBlocking() method for output

Modified:
    tomcat/trunk/java/org/apache/coyote/http11/AbstractOutputBuffer.java
    tomcat/trunk/java/org/apache/coyote/http11/InternalAprOutputBuffer.java
    tomcat/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java
    tomcat/trunk/java/org/apache/coyote/http11/InternalOutputBuffer.java

Modified: tomcat/trunk/java/org/apache/coyote/http11/AbstractOutputBuffer.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/AbstractOutputBuffer.java?rev=1478358&r1=1478357&r2=1478358&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/AbstractOutputBuffer.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/AbstractOutputBuffer.java Thu May  2 13:03:52
2013
@@ -578,7 +578,6 @@ public abstract class AbstractOutputBuff
 
     protected abstract boolean hasDataToWrite();
     protected abstract void setBlocking(boolean blocking);
-    protected abstract boolean isBlocking();
 
     /**
      * Writes any remaining buffered data.
@@ -591,6 +590,14 @@ public abstract class AbstractOutputBuff
     protected abstract boolean flushBuffer(boolean block) throws IOException;
 
 
+    /**
+     * Is standard Servlet blocking IO being used for output?
+     */
+    protected final boolean isBlocking() {
+        return response.getWriteListener() == null;
+    }
+
+
     protected final boolean isReady() {
         return !hasDataToWrite();
     }

Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalAprOutputBuffer.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/InternalAprOutputBuffer.java?rev=1478358&r1=1478357&r2=1478358&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/InternalAprOutputBuffer.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/InternalAprOutputBuffer.java Thu May  2 13:03:52
2013
@@ -180,13 +180,6 @@ public class InternalAprOutputBuffer ext
     }
 
 
-    @Override
-    public boolean isBlocking() {
-        // TODO
-        return false;
-    }
-
-
     // ----------------------------------- OutputStreamOutputBuffer Inner Class
 
     /**

Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java?rev=1478358&r1=1478357&r2=1478358&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java Thu May  2 13:03:52
2013
@@ -366,11 +366,6 @@ public class InternalNioOutputBuffer ext
         this.bufferedWriteSize = bufferedWriteSize;
     }
 
-    @Override
-    public boolean isBlocking() {
-        return bufferedWrite == null;
-    }
-
     private boolean hasBufferedData() {
         boolean result = false;
         if (bufferedWrite!=null) {

Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalOutputBuffer.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/InternalOutputBuffer.java?rev=1478358&r1=1478357&r2=1478358&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/InternalOutputBuffer.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/InternalOutputBuffer.java Thu May  2 13:03:52
2013
@@ -198,13 +198,6 @@ public class InternalOutputBuffer extend
 
 
     @Override
-    public boolean isBlocking() {
-        // TODO
-        return false;
-    }
-
-
-    @Override
     protected boolean flushBuffer(boolean block) throws IOException {
         // Blocking connector so ignore block parameter as this will always use
         // blocking IO.



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message