public void addChannel(NioChannel channel) {
        channels.add(channel);

        channel.getCloseFuture().addListener(new IoFutureListener() {
            @Override
            public void operationComplete(Future future) throws Exception {
                removeChannel(((Futures.CloseFuture) future).channel());
            }
        });
    }
@author Robert HG (254963746@qq.com) on 1/24/16.
lts-core/src/main/java/com/github/ltsopensource/nio/idle/IdleDetector.java