Added factory method for HttpGenerator.

This commit is contained in:
Simone Bordet 2012-02-08 18:45:24 +01:00
parent 74faad2ef6
commit c7814d88d7
1 changed files with 6 additions and 1 deletions

View File

@ -149,7 +149,7 @@ public abstract class AbstractHttpConnection extends AbstractConnection
_responseFields = new HttpFields(server.getMaxCookieVersion());
_request = new Request(this);
_response = new Response(this);
_generator = new HttpGenerator(ab.getResponseBuffers(), _endp);
_generator = newHttpGenerator(ab.getResponseBuffers(), endpoint);
_generator.setSendServerVersion(server.getSendServerVersion());
_server = server;
}
@ -177,6 +177,11 @@ public abstract class AbstractHttpConnection extends AbstractConnection
return new HttpParser(requestBuffers, endpoint, requestHandler);
}
protected HttpGenerator newHttpGenerator(Buffers responseBuffers, EndPoint endPoint)
{
return new HttpGenerator(responseBuffers, endPoint);
}
/* ------------------------------------------------------------ */
/**
* @return the parser used by this connection