List of usage examples for io.netty.bootstrap ServerBootstrapConfig childGroup
@SuppressWarnings("deprecation") public EventLoopGroup childGroup()
From source file:io.crate.mqtt.netty.Netty4MqttServerTransport.java
@Override protected void doStop() { for (Channel channel : serverChannels) { channel.close().awaitUninterruptibly(); }//from w w w. j a v a2s . c om serverChannels.clear(); if (serverBootstrap != null) { ServerBootstrapConfig config = serverBootstrap.config(); config.group().shutdownGracefully(0, 5, TimeUnit.SECONDS).awaitUninterruptibly(); config.childGroup().shutdownGracefully(0, 5, TimeUnit.SECONDS).awaitUninterruptibly(); serverBootstrap = null; } }
From source file:io.crate.protocols.postgres.PostgresNetty.java
License:Apache License
@Override protected void doStop() { for (Channel channel : serverChannels) { channel.close().awaitUninterruptibly(); }//from ww w . ja va 2 s . c o m serverChannels.clear(); if (bootstrap != null) { ServerBootstrapConfig config = bootstrap.config(); config.group().shutdownGracefully(0, 5, TimeUnit.SECONDS).awaitUninterruptibly(); config.childGroup().shutdownGracefully(0, 5, TimeUnit.SECONDS).awaitUninterruptibly(); bootstrap = null; } }