Class AbstractIQHandler

  • All Implemented Interfaces:
    IQHandler

    public abstract class AbstractIQHandler
    extends Object
    implements IQHandler
    This class is an IQ handler for extension managers.

    If an extension is disabled, IQs with this extension are automatically responded to with <service-unavailable.

    If the extension is known, but the request contains a wrong type (e.g. 'set' instead of 'get') this manager automatically responds with a <bad-request/> error.

    • Method Detail

      • handleRequest

        public final IQ handleRequest​(IQ iq)
        Description copied from interface: IQHandler
        Handles an inbound IQ stanza of type get or set.

        The returned IQ must be of type result or error. If null is returned, no response is returned to the requester and you must take responsibility of sending a response manually. However, this approach is not recommended.

        Use IQ.createResult() or IQ.createError(rocks.xmpp.core.stanza.model.StanzaError) to generate the response IQ (i.e. an IQ with the same id).

        Specified by:
        handleRequest in interface IQHandler
        Parameters:
        iq - The inbound IQ stanza.
        Returns:
        The result or error IQ, which is the response to sending entity.