JDiscServerConnector(ConnectorConfig config, Metric metric, Server server,
ServerSocketChannel channelOpenedByActivator, ConnectionFactory... factories) {
super(server, factories);
this.channelOpenedByActivator = channelOpenedByActivator;
this.tcpKeepAlive = config.tcpKeepAliveEnabled();
this.tcpNoDelay = config.tcpNoDelay();
this.metric = metric;
this.connectorName = config.name();
this.listenPort = config.listenPort();
this.metricCtx = metric.createContext(createConnectorDimensions(listenPort, connectorName));
this.statistics = new ServerConnectionStatistics();
addBean(statistics);
ConnectorConfig.Throttling throttlingConfig = config.throttling();
if (throttlingConfig.enabled()) {
new ConnectionThrottler(this, throttlingConfig).registerWithConnector();
}
}