public void addChannelHandler(final NettyChannelHandlerFactory factory) {
        // Add to future channels.
        channelHandlerFactories.add(factory);

        // Add to channels that already exist.
        this.allChannels.forEach(channel -> {
            try {
                factory.addNewHandlerTo(channel.pipeline());
            } catch (Throwable t) {
                Log.warn("Unable to add ChannelHandler from '{}' to pipeline of pre-existing channel: {}", factory, channel, t);
            }
        });
    }
Adds a new ChannelHandler factory, which will cause ChannelHandlers to be added to existing and new Channels
that are generated by this acceptor.

Note that instances of NettyConnectionAcceptor are replaced when the configuration of the ConnectionListener is
modified. The new instance will not automatically have the factory that was added to an earlier instance. Listen
for ConnectionAcceptor events to be able to re-supply the factory if need be

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