public void removeChannelHandler(final NettyChannelHandlerFactory factory) {
        // Remove from future channels.
        channelHandlerFactories.remove(factory);

        // Remove from channels that already exist.
        for (Channel channel : this.allChannels) {
            try {
                factory.removeHandlerFrom(channel.pipeline());
            } catch (Throwable t) {
                Log.warn("Unable to remove ChannelHandler from '{}' from pipeline of channel: {}", factory, channel, t);
            }
        }
    }
Removes a new ChannelHandler factory, which will cause the ChannelHandler that it created to be removed from
existing Channels that were generated by this acceptor. New Channels will no longer get a ChannelHandler from
this factory either.

@param factory A factory of ChannelHandler instances.
xmppserver/src/main/java/org/jivesoftware/openfire/spi/NettyConnectionAcceptor.java