/** * Close the given channel. * * @param channel * The channel object. * @param <C> * The type of the channel object. */ protected <C> void close(@Nonnull C channel) { Assert.notNull(channel, "Channel cannot be null"); for (Registration<? extends NetChannel<IN, OUT>> reg : netChannels.select(channel)) { NetChannel<IN, OUT> chann = reg.getObject(); reg.cancel(); notifyClose(chann); } }