Interface MamElementFactory

    • Method Detail

      • forParser

        static MamElementFactory forParser​(XmlPullParser parser)
        Creates a new MamElementFactory for the parser based on the namespace of the parser.
        Parameters:
        parser - the XML parser to retrieve the MAM namespace from
        Returns:
        the factory suitable for the MAM namespace
      • newFinIQ

        MamFinIQ newFinIQ​(String queryId,
                          RSMSet rsmSet,
                          boolean complete,
                          boolean stable)
        Create a MAM fin IQ class.
        Parameters:
        queryId - id of the query
        rsmSet - the RSM set included in the <fin/>
        complete - true if the results returned by the server are complete (no further paging in needed)
        stable - false if the results returned by the sever are unstable (e.g. they might later change in sequence or content)
        Returns:
        the fin IQ
      • newPrefsIQ

        MamPrefsIQ newPrefsIQ​(List<Jid> alwaysJids,
                              List<Jid> neverJids,
                              MamPrefsIQ.DefaultBehavior defaultBehavior)
        Create a new MAM preferences IQ.
        Parameters:
        alwaysJids - JIDs for which all messages are archived by default
        neverJids - JIDs for which messages are never archived
        defaultBehavior - default archive behavior
        Returns:
        the prefs IQ
      • newPrefsIQ

        MamPrefsIQ newPrefsIQ()
        Construct a new MAM <prefs/> IQ retrieval request (IQ type 'get').
        Returns:
        the prefs IQ
      • newQueryIQ

        MamQueryIQ newQueryIQ​(String queryId,
                              String node,
                              DataForm dataForm)
        Create a new MAM Query IQ.
        Parameters:
        queryId - id of the query
        node - pubsub node id when querying a pubsub node, null when not querying a pubsub node
        dataForm - the dataform containing the query parameters
        Returns:
        the query IQ