private void process(
        @Nonnull final Message packet,
        @Nullable final MUCRoom room,
        @Nullable final MUCOccupant preExistingOccupantData )
    {
        if (Message.Type.error == packet.getType()) {
            Log.trace("Ignoring messages of type 'error' sent by '{}' to MUC room '{}'", packet.getFrom(), packet.getTo());
            return;
        }

        if (room == null) {
            Log.debug("Rejecting message stanza sent by '{}' to room '{}': Room does not exist.", packet.getFrom(), packet.getTo());
            sendErrorPacket(packet, PacketError.Condition.recipient_unavailable, "The room that the message was addressed to is not available.");
            return;
        }

        if ( preExistingOccupantData == null )
        {
            processNonOccupantMessage(packet, room);
        }
        else
        {
            processOccupantMessage(packet, room, preExistingOccupantData);
        }
    }
Processes a Message stanza.

@param packet                  The stanza to route
@param room                    The room that the stanza was addressed to.
@param preExistingOccupantData The occupant data of this user in the addressed room prior to processing of this stanza, if any.
xmppserver/src/main/java/org/jivesoftware/openfire/muc/spi/MultiUserChatServiceImpl.java