Interface MamElementFactory


public interface MamElementFactory
Factory that creates MAM objects.
Since:
4.5.0
  • Method Details

    • forParser

      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
    • newResultExtension

      Create a MAM result extension class.
      Parameters:
      queryId - id of the query
      id - the message's archive UID
      forwarded - the original message as it was received
      Returns:
      the result extension
    • 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

      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