private boolean process(final IQ iq) {
        final Element childElement = iq.getChildElement();
        String namespace = null;
        // Ignore IQs of type ERROR
        if (IQ.Type.error == iq.getType()) {
            return false;
        }
        if (iq.getTo().getResource() != null) {
            // Ignore IQ packets sent to room occupants
            return false;
        }
        if (childElement != null) {
            namespace = childElement.getNamespaceURI();
        }
        if ("jabber:iq:register".equals(namespace)) {
            final IQ reply = registerHandler.handleIQ(iq);
            if (reply != null) {
                XMPPServer.getInstance().getPacketRouter().route(reply);
            }
        }
        else if ("jabber:iq:search".equals(namespace)) {
            final IQ reply = searchHandler.handleIQ(iq);
            if (reply != null) {
                XMPPServer.getInstance().getPacketRouter().route(reply);
            }
        }
        else if (IQExtendedChannelSearchHandler.NAMESPACE.equals(namespace)) {
            final IQ reply = extendedChannelSearchHandler.handleIQ(iq);
            if (reply != null) {
                XMPPServer.getInstance().getPacketRouter().route(reply);
            }
        }
        else if (IQMuclumbusSearchHandler.NAMESPACE.equals(namespace)) {
            final IQ reply = muclumbusSearchHandler.handleIQ(iq);
            if (reply != null) {
                XMPPServer.getInstance().getPacketRouter().route(reply);
            }
        }
        else if (IQMUCvCardHandler.NAMESPACE.equals(namespace)) {
            final IQ reply = mucVCardHandler.handleIQ(iq);
            if (reply != null) {
                XMPPServer.getInstance().getPacketRouter().route(reply);
            }
        }
        else if ("http://jabber.org/protocol/disco#info".equals(namespace)) {
            // TODO MUC should have an IQDiscoInfoHandler of its own when MUC becomes a component
            final IQ reply = XMPPServer.getInstance().getIQDiscoInfoHandler().handleIQ(iq);
            if (reply != null) {
                XMPPServer.getInstance().getPacketRouter().route(reply);
            }
        }
        else if ("http://jabber.org/protocol/disco#items".equals(namespace)) {
            // TODO MUC should have an IQDiscoItemsHandler of its own when MUC becomes a component
            final IQ reply = XMPPServer.getInstance().getIQDiscoItemsHandler().handleIQ(iq);
            if (reply != null) {
                XMPPServer.getInstance().getPacketRouter().route(reply);
            }
        }
        else if ("urn:xmpp:ping".equals(namespace)) {
            if (iq.isRequest()) {
                XMPPServer.getInstance().getPacketRouter().route( IQ.createResultIQ(iq) );
            }
        }
        else if (this.iqHandlers != null) {
            final IQHandler h = this.iqHandlers.get(namespace);
            if (h != null) {
                try {
                    final IQ reply = h.handleIQ(iq);
                    if (reply != null) {
                        XMPPServer.getInstance().getPacketRouter().route(reply);
                    }
                } catch (final UnauthorizedException e) {
                    Log.trace("Responding with 'service-unavailable' due to authorization exception, to: {}", iq, e);
                    final IQ reply = IQ.createResultIQ(iq);
                    reply.setType(IQ.Type.error);
                    reply.setError(PacketError.Condition.service_unavailable);
                    XMPPServer.getInstance().getPacketRouter().route(reply);
                }
                return true;
            }
            return false;
        } else {
            return false;
        }
        return true;
    }
Returns true if the IQ packet was processed. This method should only process disco packets
as well as jabber:iq:register packets sent to the MUC service.

@param iq the IQ packet to process.
@return true if the IQ packet was processed.
xmppserver/src/main/java/org/jivesoftware/openfire/muc/spi/MultiUserChatServiceImpl.java