public synchronized void process( @Nonnull final Packet stanza )
    {
        if ( !(room.isFmucEnabled() && FMUC_ENABLED.getValue()) ) {
            Log.debug( "(room: '{}'): FMUC disabled, skipping processing of stanza: {}", room.getJID(), stanza.toXML() );
            if ( stanza instanceof IQ && ((IQ) stanza).isRequest() ) {
                final IQ errorResult = IQ.createResultIQ( (IQ) stanza);
                errorResult.setError(PacketError.Condition.service_unavailable);
                XMPPServer.getInstance().getPacketRouter().route( errorResult );
            }
            return;
        }

        Log.trace( "(room: '{}'): Processing stanza from '{}': {}", room.getJID(), stanza.getFrom(), stanza.toXML() );
        final JID remoteMUC = stanza.getFrom().asBareJID();

        if ( stanza.getElement().element(FMUC) == null ) {
            throw new IllegalArgumentException( "Unable to process stanza that does not have FMUC data: " + stanza.toXML() );
        }

        if ( remoteMUC.getNode() == null ) {
            throw new IllegalArgumentException( "Unable to process stanza that did not originate from a MUC room (the 'from' address has no node-part):" + stanza.toXML() );
        }

        if ( outboundJoinProgress != null && outboundJoinProgress.getPeer().equals( remoteMUC ) && !outboundJoinProgress.isJoinComplete() )
        {
            Log.trace("(room: '{}'): Received stanza from '{}' that is identified as outbound FMUC node for which a join is in progress.", room.getJID(), remoteMUC);

            Log.trace("(room: '{}'): Queueing stanza from '{}' as partial FMUC join response.", room.getJID(), remoteMUC);
            outboundJoinProgress.addResponse(stanza);

            if ( outboundJoinProgress.isJoinComplete() )
            {
                Log.debug("(room: '{}'): Received a complete FMUC join response from '{}'.", room.getJID(), remoteMUC);
                finishOutboundJoin();
                outboundJoinProgress = null;
            }
        }
        else if ( outboundJoin != null && outboundJoin.getPeer().equals( remoteMUC ) )
        {
            Log.trace("(room: '{}'): Received stanza from '{}' that is identified as outbound FMUC node.", room.getJID(), remoteMUC);
            if ( stanza instanceof Presence && stanza.getElement().element(FMUC).element("left") != null ) {
                processLeftInstruction( (Presence) stanza );
            } else {
                outboundJoin.evaluateForCallbackCompletion(stanza);
                processRegularMUCStanza( stanza );
            }
        }
        else if ( inboundJoins.get( remoteMUC.asBareJID() ) != null )
        {
            Log.trace("(room: '{}'): Received stanza from '{}' that is identified as inbound FMUC node.", room.getJID(), remoteMUC);
            processRegularMUCStanza( stanza );
        }
        else
        {
            Log.trace("(room: '{}'): Received stanza from '{}' that is not a known FMUC node.", room.getJID(), remoteMUC ); //Treating as inbound FMUC node join request.", room.getJID(), remoteMUC);
            if ( isFMUCJoinRequest( stanza ) ) {
                try
                {
                    checkAcceptingFMUCJoiningNodePreconditions(remoteMUC);
                    acceptJoiningFMUCNode( (Presence) stanza );
                } catch ( final FMUCException e ) {
                    rejectJoiningFMUCNode( (Presence) stanza, e.getMessage() );
                }
            } else {
                Log.debug("(room: '{}'): Unable to process stanza from '{}'. Ignoring: {}", room.getJID(), remoteMUC, stanza.toXML() );
                if ( stanza instanceof IQ && ((IQ) stanza).isRequest() ) {
                    final IQ errorResult = IQ.createResultIQ( (IQ) stanza);
                    errorResult.setError(PacketError.Condition.service_unavailable);
                    XMPPServer.getInstance().getPacketRouter().route( errorResult );
                }
            }
        }
    }
Creates a stanza that represents a room 'join' in a MUC room.

@param occupantData Representation of the (local) user that caused the join to be initiated.
xmppserver/src/main/java/org/jivesoftware/openfire/muc/spi/FMUCHandler.java