Interface MamElementFactory
-
public interface MamElementFactory
Factory that creates MAM objects.- Since:
- 4.5.0
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static MamElementFactory
forParser(XmlPullParser parser)
Creates a newMamElementFactory
for the parser based on the namespace of the parser.MamFinIQ
newFinIQ(String queryId, RSMSet rsmSet, boolean complete, boolean stable)
Create a MAM fin IQ class.MamPrefsIQ
newPrefsIQ()
Construct a new MAM<prefs/>
IQ retrieval request (IQ type 'get').MamPrefsIQ
newPrefsIQ(List<Jid> alwaysJids, List<Jid> neverJids, MamPrefsIQ.DefaultBehavior defaultBehavior)
Create a new MAM preferences IQ.MamQueryIQ
newQueryIQ(String queryId, String node, DataForm dataForm)
Create a new MAM Query IQ.MamElements.MamResultExtension
newResultExtension(String queryId, String id, Forwarded<Message> forwarded)
Create a MAM result extension class.
-
-
-
Method Detail
-
forParser
static MamElementFactory forParser(XmlPullParser parser)
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
MamFinIQ newFinIQ(String queryId, RSMSet rsmSet, boolean complete, boolean stable)
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
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 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
-
-