Moved factory method for FlowControlStrategy to SPDYServerConnector for easier overriding.
This commit is contained in:
parent
4b29f18703
commit
b0156b69bc
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue