Moved factory method for FlowControlStrategy to SPDYServerConnector for easier overriding.

This commit is contained in:
Simone Bordet 2012-06-03 11:28:52 +02:00
parent 4b29f18703
commit b0156b69bc
2 changed files with 6 additions and 6 deletions

View File

@ -232,6 +232,11 @@ public class SPDYServerConnector extends SelectChannelConnector
}
}
protected FlowControlStrategy newFlowControlStrategy(short version)
{
return FlowControlStrategyFactory.newFlowControlStrategy(version);
}
protected SSLEngine newSSLEngine(SslContextFactory sslContextFactory, SocketChannel channel)
{
String peerHost = channel.socket().getInetAddress().getHostAddress();

View File

@ -68,7 +68,7 @@ public class ServerSPDYAsyncConnectionFactory implements AsyncConnectionFactory
SPDYAsyncConnection connection = new ServerSPDYAsyncConnection(endPoint, bufferPool, parser, listener, connector);
endPoint.setConnection(connection);
FlowControlStrategy flowControlStrategy = newFlowControlStrategy(version);
FlowControlStrategy flowControlStrategy = connector.newFlowControlStrategy(version);
StandardSession session = new StandardSession(version, bufferPool, threadPool, scheduler, connection, connection, 2, listener, generator, flowControlStrategy);
session.setWindowSize(connector.getInitialWindowSize());
@ -85,11 +85,6 @@ public class ServerSPDYAsyncConnectionFactory implements AsyncConnectionFactory
return listener;
}
protected FlowControlStrategy newFlowControlStrategy(short version)
{
return FlowControlStrategyFactory.newFlowControlStrategy(version);
}
private static class ServerSPDYAsyncConnection extends SPDYAsyncConnection
{
private final ServerSessionFrameListener listener;