Jetty9 - Removed unnecessary _server field.

This commit is contained in:
Simone Bordet 2012-08-29 14:47:15 +02:00
parent 2e81b63807
commit 4180db6fae
1 changed files with 3 additions and 5 deletions

View File

@ -51,8 +51,7 @@ public class HttpConnection extends AbstractConnection implements Runnable, Http
private final HttpConfiguration _configuration;
private final Connector _connector;
private final ByteBufferPool _bufferPool;
private final Server _server;
private final ByteBufferPool _bufferPool; // TODO: remove field, use a _connector.getByteBufferPool()
private final HttpGenerator _generator;
private final HttpChannelOverHttp _channel;
private final HttpParser _parser;
@ -76,9 +75,8 @@ public class HttpConnection extends AbstractConnection implements Runnable, Http
_configuration = config;
_connector = connector;
_bufferPool = _connector.getByteBufferPool();
_server = connector.getServer();
_generator = new HttpGenerator(); // TODO: consider moving the generator to the transport, where it belongs
_generator.setSendServerVersion(_server.getSendServerVersion());
_generator.setSendServerVersion(getServer().getSendServerVersion());
_channel = new HttpChannelOverHttp(connector, config, endPoint, this, new Input());
_parser = new HttpParser(_channel,config.getRequestHeaderSize());
@ -87,7 +85,7 @@ public class HttpConnection extends AbstractConnection implements Runnable, Http
public Server getServer()
{
return _server;
return _connector.getServer();
}
public Connector getConnector()