List of usage examples for io.netty.bootstrap ChannelFactory newChannel
T newChannel();
From source file:io.viewserver.network.netty.ipc.NettyIpcEndpoint.java
License:Apache License
@Override public ServerBootstrap getServerBootstrap(EventLoopGroup parentGroup, EventLoopGroup childGroup, ChannelHandler handler) {//from www. j a v a 2 s. c om ServerBootstrap server = new ServerBootstrap() { @Override public ServerBootstrap channelFactory(ChannelFactory<? extends ServerChannel> channelFactory) { return super.channelFactory(new ChannelFactory<ServerChannel>() { @Override public ServerChannel newChannel() { try { return channelFactory.newChannel(); } catch (Throwable ex) { return null; } } }); } }; server.group(parentGroup, childGroup).channel(EpollServerDomainSocketChannel.class).childHandler(handler); try { server.bind(new DomainSocketAddress(name)); } catch (Throwable ex) { log.warn("Could not listen on IPC socket '" + name + "'"); return null; } return server; }