jetty-9 renamed HttpTransport.{commit|write} to send
This commit is contained in:
parent
838ddcd444
commit
9a1a020f0e
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue