You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2015/01/01 18:14:25 UTC
svn commit: r1648904 - in /tomcat/trunk/java/org/apache/coyote/http11:
AbstractOutputBuffer.java InternalAprOutputBuffer.java
InternalNio2OutputBuffer.java InternalNioOutputBuffer.java
Author: markt
Date: Thu Jan 1 17:14:25 2015
New Revision: 1648904
URL: http://svn.apache.org/r1648904
Log:
Pull up commit()
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/InternalNio2OutputBuffer.java
tomcat/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.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=1648904&r1=1648903&r2=1648904&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/AbstractOutputBuffer.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/AbstractOutputBuffer.java Thu Jan 1 17:14:25 2015
@@ -373,7 +373,21 @@ public abstract class AbstractOutputBuff
public abstract void sendAck() throws IOException;
- protected abstract void commit() throws IOException;
+ /**
+ * Commit the response.
+ *
+ * @throws IOException an underlying I/O error occurred
+ */
+ protected void commit() throws IOException {
+ // The response is now committed
+ committed = true;
+ response.setCommitted(true);
+
+ if (pos > 0) {
+ // Sending the response header buffer
+ addToBB(headerBuffer, 0, pos);
+ }
+ }
/**
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=1648904&r1=1648903&r2=1648904&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/InternalAprOutputBuffer.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/InternalAprOutputBuffer.java Thu Jan 1 17:14:25 2015
@@ -113,27 +113,6 @@ public class InternalAprOutputBuffer ext
// ------------------------------------------------------ Protected Methods
-
- /**
- * Commit the response.
- *
- * @throws IOException an underlying I/O error occurred
- */
- @Override
- protected void commit() throws IOException {
-
- // The response is now committed
- committed = true;
- response.setCommitted(true);
-
- if (pos > 0) {
- // Sending the response header buffer
- socketWriteBuffer.put(headerBuffer, 0, pos);
- }
-
- }
-
-
@Override
protected synchronized void addToBB(byte[] buf, int offset, int length)
throws IOException {
Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalNio2OutputBuffer.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/InternalNio2OutputBuffer.java?rev=1648904&r1=1648903&r2=1648904&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/InternalNio2OutputBuffer.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/InternalNio2OutputBuffer.java Thu Jan 1 17:14:25 2015
@@ -248,25 +248,6 @@ public class InternalNio2OutputBuffer ex
// ------------------------------------------------------ Protected Methods
- /**
- * Commit the response.
- *
- * @throws IOException an underlying I/O error occurred
- */
- @Override
- protected void commit() throws IOException {
-
- // The response is now committed
- committed = true;
- response.setCommitted(true);
-
- if (pos > 0) {
- // Sending the response header buffer
- addToBB(headerBuffer, 0, pos);
- }
-
- }
-
private static boolean arrayHasData(ByteBuffer[] byteBuffers) {
for (ByteBuffer byteBuffer : byteBuffers) {
if (byteBuffer.hasRemaining()) {
@@ -451,7 +432,7 @@ public class InternalNio2OutputBuffer ex
}
@Override
- public void registerWriteInterest() {
+ protected void registerWriteInterest() {
synchronized (completionHandler) {
if (writePending.availablePermits() == 0) {
interest = true;
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=1648904&r1=1648903&r2=1648904&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java Thu Jan 1 17:14:25 2015
@@ -147,26 +147,6 @@ public class InternalNioOutputBuffer ext
// ------------------------------------------------------ Protected Methods
- /**
- * Commit the response.
- *
- * @throws IOException an underlying I/O error occurred
- */
- @Override
- protected void commit() throws IOException {
-
- // The response is now committed
- committed = true;
- response.setCommitted(true);
-
- if (pos > 0) {
- // Sending the response header buffer
- addToBB(headerBuffer, 0, pos);
- }
-
- }
-
-
@Override
protected synchronized void addToBB(byte[] buf, int offset, int length)
throws IOException {
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org