diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java index 76376bf07d2..c6d59adf331 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java @@ -565,7 +565,7 @@ public class HttpChannel implements HttpParser.RequestHandler, Runnable try { // Try to commit with the passed info - _transport.commit(info, content, complete); + _transport.send(info, content, complete); // If we are committing a 1xx response, we need to reset the commit // status so that the "real" response can be committed again. @@ -576,7 +576,7 @@ public class HttpChannel implements HttpParser.RequestHandler, Runnable { LOG.warn(e); // "application" info failed to commit, commit with a failsafe 500 info - _transport.commit(HttpGenerator.RESPONSE_500_INFO,null,true); + _transport.send(HttpGenerator.RESPONSE_500_INFO,null,true); throw e; } } @@ -600,7 +600,7 @@ public class HttpChannel implements HttpParser.RequestHandler, Runnable { if (isCommitted()) { - _transport.write(content, complete); + _transport.send(content, complete); } else { diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpConnection.java b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpConnection.java index 317e94e335b..3e64db8500d 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpConnection.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpConnection.java @@ -280,7 +280,7 @@ public class HttpConnection extends AbstractConnection implements Runnable, Http @Override - public void commit(HttpGenerator.ResponseInfo info, ByteBuffer content, boolean lastContent) throws IOException + public void send(HttpGenerator.ResponseInfo info, ByteBuffer content, boolean lastContent) throws IOException { // TODO This is always blocking! One of the important use-cases is to be able to write large static content without a thread @@ -375,9 +375,9 @@ public class HttpConnection extends AbstractConnection implements Runnable, Http } @Override - public void write(ByteBuffer content, boolean lastContent) throws IOException + public void send(ByteBuffer content, boolean lastContent) throws IOException { - commit(null, content, lastContent); + send(null, content, lastContent); } private void blockingWrite(ByteBuffer... bytes) throws IOException diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpTransport.java b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpTransport.java index 08247e954d8..ad1ee96a07f 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpTransport.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpTransport.java @@ -7,9 +7,9 @@ import org.eclipse.jetty.http.HttpGenerator; public interface HttpTransport { - void commit(HttpGenerator.ResponseInfo info, ByteBuffer content, boolean lastContent) throws IOException; + void send(HttpGenerator.ResponseInfo info, ByteBuffer content, boolean lastContent) throws IOException; - void write(ByteBuffer content, boolean lastContent) throws IOException; + void send(ByteBuffer content, boolean lastContent) throws IOException; void completed(); } diff --git a/jetty-server/src/test/java/org/eclipse/jetty/server/ResponseTest.java b/jetty-server/src/test/java/org/eclipse/jetty/server/ResponseTest.java index 1109dea45bd..a1ce4cfc12d 100644 --- a/jetty-server/src/test/java/org/eclipse/jetty/server/ResponseTest.java +++ b/jetty-server/src/test/java/org/eclipse/jetty/server/ResponseTest.java @@ -75,12 +75,12 @@ public class ResponseTest _channel = new HttpChannel(connector, new HttpConfiguration(null, false), endp, new HttpTransport() { @Override - public void commit(HttpGenerator.ResponseInfo info, ByteBuffer content, boolean lastContent) throws IOException + public void send(HttpGenerator.ResponseInfo info, ByteBuffer content, boolean lastContent) throws IOException { } @Override - public void write(ByteBuffer content, boolean lastContent) throws IOException + public void send(ByteBuffer content, boolean lastContent) throws IOException { } diff --git a/jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/http/HttpTransportOverSPDY.java b/jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/http/HttpTransportOverSPDY.java index b21fed4f425..593d6fb687d 100644 --- a/jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/http/HttpTransportOverSPDY.java +++ b/jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/http/HttpTransportOverSPDY.java @@ -64,7 +64,7 @@ public class HttpTransportOverSPDY implements HttpTransport } @Override - public void commit(HttpGenerator.ResponseInfo info, ByteBuffer content, boolean lastContent) throws IOException + public void send(HttpGenerator.ResponseInfo info, ByteBuffer content, boolean lastContent) throws IOException { short version = stream.getSession().getVersion(); Headers headers = new Headers(); @@ -104,7 +104,7 @@ public class HttpTransportOverSPDY implements HttpTransport } @Override - public void write(ByteBuffer content, boolean lastContent) throws IOException + public void send(ByteBuffer content, boolean lastContent) throws IOException { stream.data(new ByteBufferDataInfo(content, lastContent)); }