Function<Stopper, ChannelInitializer<SocketChannel>> channelInitializer = buildChannelInitializer(launchConfig);
return new NettyRatpackServer(launchConfig, channelInitializer);
}
private static Function<Stopper, ChannelInitializer<SocketChannel>> buildChannelInitializer(final LaunchConfig launchConfig) {
return stopper -> new RatpackChannelInitializer(launchConfig, createHandler(launchConfig), stopper);
}