Interface MamElementFactory
public interface MamElementFactory
Factory that creates MAM objects.
- Since:
- 4.5.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic MamElementFactory
forParser
(XmlPullParser parser) Creates a newMamElementFactory
for the parser based on the namespace of the parser.Create a MAM fin IQ class.Construct a new MAM<prefs/>
IQ retrieval request (IQ type 'get').newPrefsIQ
(List<Jid> alwaysJids, List<Jid> neverJids, MamPrefsIQ.DefaultBehavior defaultBehavior) Create a new MAM preferences IQ.newQueryIQ
(String queryId, String node, DataForm dataForm) Create a new MAM Query IQ.newResultExtension
(String queryId, String id, Forwarded<Message> forwarded) Create a MAM result extension class.
-
Method Details
-
forParser
Creates a newMamElementFactory
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
MamElements.MamResultExtension newResultExtension(String queryId, String id, Forwarded<Message> forwarded) Create a MAM result extension class.- Parameters:
queryId
- id of the queryid
- the message's archive UIDforwarded
- the original message as it was received- Returns:
- the result extension
-
newFinIQ
Create a MAM fin IQ class.- Parameters:
queryId
- id of the queryrsmSet
- 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 defaultneverJids
- JIDs for which messages are never archiveddefaultBehavior
- default archive behavior- Returns:
- the prefs IQ
-
newPrefsIQ
Construct a new MAM<prefs/>
IQ retrieval request (IQ type 'get').- Returns:
- the prefs IQ
-
newQueryIQ
Create a new MAM Query IQ.- Parameters:
queryId
- id of the querynode
- pubsub node id when querying a pubsub node, null when not querying a pubsub nodedataForm
- the dataform containing the query parameters- Returns:
- the query IQ
-