Jetty9 - Added and used shortcut method getByteBufferPool() in place of getConnector().getByteBufferPool(), also used by tests.
This commit is contained in:
parent
c009cef661
commit
90029a14eb
|
@ -39,6 +39,7 @@ import org.eclipse.jetty.http.HttpStatus;
|
|||
import org.eclipse.jetty.http.HttpURI;
|
||||
import org.eclipse.jetty.http.HttpVersion;
|
||||
import org.eclipse.jetty.http.MimeTypes;
|
||||
import org.eclipse.jetty.io.ByteBufferPool;
|
||||
import org.eclipse.jetty.io.EndPoint;
|
||||
import org.eclipse.jetty.io.EofException;
|
||||
import org.eclipse.jetty.server.handler.ErrorHandler;
|
||||
|
@ -126,6 +127,11 @@ public class HttpChannel implements HttpParser.RequestHandler, Runnable
|
|||
return _connector;
|
||||
}
|
||||
|
||||
public ByteBufferPool getByteBufferPool()
|
||||
{
|
||||
return _connector.getByteBufferPool();
|
||||
}
|
||||
|
||||
public HttpConfiguration getHttpConfiguration()
|
||||
{
|
||||
return _configuration;
|
||||
|
|
|
@ -139,7 +139,7 @@ public class HttpOutput extends ServletOutputStream
|
|||
}
|
||||
|
||||
// Allocate an aggregate buffer
|
||||
_aggregate = _channel.getConnector().getByteBufferPool().acquire(size, false);
|
||||
_aggregate = _channel.getByteBufferPool().acquire(size, false);
|
||||
}
|
||||
|
||||
// Do we have space to aggregate ?
|
||||
|
@ -179,7 +179,7 @@ public class HttpOutput extends ServletOutputStream
|
|||
throw new EOFException();
|
||||
|
||||
if (_aggregate == null)
|
||||
_aggregate = _channel.getConnector().getByteBufferPool().acquire(getBufferSize(), false);
|
||||
_aggregate = _channel.getByteBufferPool().acquire(getBufferSize(), false);
|
||||
|
||||
BufferUtil.append(_aggregate, (byte)b);
|
||||
_written++;
|
||||
|
|
Loading…
Reference in New Issue