public void add( final T packet )
    {
        Runnable r = () -> {
            try
            {
                channelHandler.process( packet );
            }
            catch ( Exception e )
            {
                Log.error( LocaleUtils.getLocalizedString( "admin.error" ), e );

                try
                {
                    Session session = SessionManager.getInstance().getSession( packet.getFrom() );
                    if ( session != null )
                    {
                        Log.debug( "Closing session of '{}': {}", packet.getFrom(), session );
                        session.close();
                    }
                }
                catch ( Exception e1 )
                {
                    Log.error( "Unexpected exception while trying to close session of '{}'.", packet.getFrom(), e1 );
                }
            }
        };
        executor.execute(r);
    }
Enqueues a message to be handled by this channel. After the ChannelHandler is done
processing the message, it will be sent to the next channel. Messages with a higher
priority will be handled first.

@param packet an XMPP packet to add to the channel for processing.
xmppserver/src/main/java/org/jivesoftware/openfire/Channel.java