public synchronized void stop()
    {
        if ( connectionAcceptor == null )
        {
            Log.debug( "Not stopping: it hasn't been started." );
            return;
        }

        Log.debug( "Stopping..." );
        try
        {
            eventListeners.forEach(eventListener -> {
                try {
                    eventListener.acceptorStopping(connectionAcceptor);
                } catch (Throwable t) {
                    Log.warn("SocketAcceptorEventListener '{}' threw exception while processing acceptor stopping event for acceptor: {}", eventListener, connectionAcceptor, t);
                }
            });
            connectionAcceptor.stop();
        }
        finally
        {
            connectionAcceptor = null;
        }
        Log.info( "Stopped." );
    }
Attempts to stop the connection acceptor. If the connection acceptor has not been started, an invocation of this
method has no effect.

An invocation of this method does not change the configuration for this connection. As a result, the acceptor for
this connection can be restarted when this ConnectionListener instance is replaced.

In order to stop this listener (and persist this as the desired state for this connection, use #enable(false).
xmppserver/src/main/java/org/jivesoftware/openfire/spi/ConnectionListener.java