Interface IQHandler

    • Method Detail

      • getPayloadClass

        Class<?> getPayloadClass()
        Gets the IQ's payload class. Only payloads of this type are handled by this handler.
        Returns:
        The IQ's payload class.
        See Also:
        Stanza.getExtension(Class)
      • handleRequest

        IQ handleRequest​(IQ iq)
        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).

        Parameters:
        iq - The inbound IQ stanza.
        Returns:
        The result or error IQ, which is the response to sending entity.