use of org.jboss.netty.channel.ChannelUpstreamHandler in project cdap by caskdata.
the class NettyRouter method startUp.
@Override
protected void startUp() throws ServiceBindException {
ChannelUpstreamHandler connectionTracker = new SimpleChannelUpstreamHandler() {
@Override
public void channelOpen(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception {
channelGroup.add(e.getChannel());
super.channelOpen(ctx, e);
}
};
tokenValidator.startAndWait();
timer = new HashedWheelTimer(new ThreadFactoryBuilder().setDaemon(true).setNameFormat("router-idle-event-generator-timer").build());
bootstrapClient(connectionTracker);
bootstrapServer(connectionTracker);
}
Aggregations