public synchronized void stop()
    {
        Log.debug( "(room: '{}'): FMUC federation is being stopped...", room.getJID() );

        // Keep track of all occupants that are becoming unavailable due to them having joined on remote nodes.
        final Set<JID> removedRemoteOccupants = new HashSet<>();

        final Set<JID> removedOccupantsInbound = doStopInbound();
        final Set<JID> removedOccupantsOutbound = doStopOutbound();
        removedRemoteOccupants.addAll( removedOccupantsInbound );
        removedRemoteOccupants.addAll( removedOccupantsOutbound );

        Log.trace( "(room: '{}'): Done disconnecting inbound and outbound nodes from the node set. Now removing all their ({}) occupants from the room.", room.getJID(), removedRemoteOccupants.size() );
        makeRemoteOccupantLeaveRoom( removedRemoteOccupants );

        isStarted = false;
        Log.debug( "(room: '{}'): Finished stopping FMUC federation.", room.getJID() );
    }
Stops federation, which will cause any joined and joining nodes to be disconnected.
xmppserver/src/main/java/org/jivesoftware/openfire/muc/spi/FMUCHandler.java