public final class MamManager
extends org.jivesoftware.smack.Manager
| Modifier and Type | Class and Description |
|---|---|
static class |
MamManager.MamPrefsResult
MAM preferences result class.
|
static class |
MamManager.MamQueryResult
MAM query result class.
|
| Modifier and Type | Method and Description |
|---|---|
static MamManager |
getInstanceFor(org.jivesoftware.smack.XMPPConnection connection)
Get the singleton instance of MamManager.
|
static MamManager |
getInstanceFor(org.jivesoftware.smack.XMPPConnection connection,
org.jxmpp.jid.Jid archiveAddress) |
boolean |
isSupported()
Check if MAM is supported for the XMPP connection managed by this MamManager.
|
boolean |
isSupportedByServer()
Deprecated.
use
isSupported() instead. |
MamManager.MamQueryResult |
mostRecentPage(org.jxmpp.jid.Jid chatJid,
int max)
Obtain the most recent page of a chat.
|
MamManager.MamQueryResult |
page(org.jivesoftware.smackx.xdata.packet.DataForm dataForm,
org.jivesoftware.smackx.rsm.packet.RSMSet rsmSet)
Returns a page of the archive.
|
MamManager.MamQueryResult |
page(java.lang.String node,
org.jivesoftware.smackx.xdata.packet.DataForm dataForm,
org.jivesoftware.smackx.rsm.packet.RSMSet rsmSet)
Returns a page of the archive.
|
MamManager.MamQueryResult |
pageAfter(org.jxmpp.jid.Jid chatJid,
java.lang.String messageUid,
int max)
Obtain page after the last message saved (specific chat).
|
MamManager.MamQueryResult |
pageBefore(org.jxmpp.jid.Jid chatJid,
java.lang.String messageUid,
int max)
Obtain page before the first message saved (specific chat).
|
MamManager.MamQueryResult |
pageNext(MamManager.MamQueryResult mamQueryResult,
int count)
Returns the next page of the archive.
|
MamManager.MamQueryResult |
pagePrevious(MamManager.MamQueryResult mamQueryResult,
int count)
Returns the previous page of the archive.
|
MamManager.MamQueryResult |
queryArchive(java.util.Date start,
java.util.Date end)
Query archive filtering by start and/or end date.
|
MamManager.MamQueryResult |
queryArchive(java.lang.Integer max)
Query archive with a maximum amount of results.
|
MamManager.MamQueryResult |
queryArchive(java.lang.Integer max,
java.util.Date start,
java.util.Date end,
org.jxmpp.jid.Jid withJid,
java.util.List<org.jivesoftware.smackx.xdata.FormField> additionalFields)
Query archive applying filters: max count, start date, end date, from/to
JID and with additional fields.
|
MamManager.MamQueryResult |
queryArchive(org.jxmpp.jid.Jid withJid)
Query archive with a JID (only messages from/to the JID).
|
MamManager.MamQueryResult |
queryArchive(java.util.List<org.jivesoftware.smackx.xdata.FormField> additionalFields)
Query Archive adding filters with additional fields.
|
MamManager.MamQueryResult |
queryArchive(java.lang.String node,
java.lang.Integer max,
java.util.Date start,
java.util.Date end,
org.jxmpp.jid.Jid withJid,
java.util.List<org.jivesoftware.smackx.xdata.FormField> additionalFields)
Query an message archive like a MUC archive or a PubSub node archive, addressed by an archiveAddress, applying
filters: max count, start date, end date, from/to JID and with additional fields.
|
MamManager.MamQueryResult |
queryArchiveWithEndDate(java.util.Date end)
Query archive filtering by end date.
|
MamManager.MamQueryResult |
queryArchiveWithStartDate(java.util.Date start)
Query archive filtering by start date.
|
MamManager.MamPrefsResult |
retrieveArchivingPreferences()
Get the preferences stored in the server.
|
java.util.List<org.jivesoftware.smackx.xdata.FormField> |
retrieveFormFields()
Get the form fields supported by the server.
|
java.util.List<org.jivesoftware.smackx.xdata.FormField> |
retrieveFormFields(java.lang.String node)
Get the form fields supported by the server.
|
MamManager.MamPrefsResult |
updateArchivingPreferences(java.util.List<org.jxmpp.jid.Jid> alwaysJids,
java.util.List<org.jxmpp.jid.Jid> neverJids,
MamPrefsIQ.DefaultBehavior defaultBehavior)
Update the preferences in the server.
|
public static MamManager getInstanceFor(org.jivesoftware.smack.XMPPConnection connection)
connection - public static MamManager getInstanceFor(org.jivesoftware.smack.XMPPConnection connection, org.jxmpp.jid.Jid archiveAddress)
public MamManager.MamQueryResult queryArchive(java.lang.Integer max) throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException, java.lang.InterruptedException, org.jivesoftware.smack.SmackException.NotLoggedInException
max - org.jivesoftware.smack.SmackException.NoResponseExceptionorg.jivesoftware.smack.XMPPException.XMPPErrorExceptionorg.jivesoftware.smack.SmackException.NotConnectedExceptionjava.lang.InterruptedExceptionorg.jivesoftware.smack.SmackException.NotLoggedInExceptionpublic MamManager.MamQueryResult queryArchive(org.jxmpp.jid.Jid withJid) throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException, java.lang.InterruptedException, org.jivesoftware.smack.SmackException.NotLoggedInException
withJid - org.jivesoftware.smack.SmackException.NoResponseExceptionorg.jivesoftware.smack.XMPPException.XMPPErrorExceptionorg.jivesoftware.smack.SmackException.NotConnectedExceptionjava.lang.InterruptedExceptionorg.jivesoftware.smack.SmackException.NotLoggedInExceptionpublic MamManager.MamQueryResult queryArchive(java.util.Date start, java.util.Date end) throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException, java.lang.InterruptedException, org.jivesoftware.smack.SmackException.NotLoggedInException
start - end - org.jivesoftware.smack.SmackException.NoResponseExceptionorg.jivesoftware.smack.XMPPException.XMPPErrorExceptionorg.jivesoftware.smack.SmackException.NotConnectedExceptionjava.lang.InterruptedExceptionorg.jivesoftware.smack.SmackException.NotLoggedInExceptionpublic MamManager.MamQueryResult queryArchive(java.util.List<org.jivesoftware.smackx.xdata.FormField> additionalFields) throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException, java.lang.InterruptedException, org.jivesoftware.smack.SmackException.NotLoggedInException
additionalFields - org.jivesoftware.smack.SmackException.NoResponseExceptionorg.jivesoftware.smack.XMPPException.XMPPErrorExceptionorg.jivesoftware.smack.SmackException.NotConnectedExceptionjava.lang.InterruptedExceptionorg.jivesoftware.smack.SmackException.NotLoggedInExceptionpublic MamManager.MamQueryResult queryArchiveWithStartDate(java.util.Date start) throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException, java.lang.InterruptedException, org.jivesoftware.smack.SmackException.NotLoggedInException
start - org.jivesoftware.smack.SmackException.NoResponseExceptionorg.jivesoftware.smack.XMPPException.XMPPErrorExceptionorg.jivesoftware.smack.SmackException.NotConnectedExceptionjava.lang.InterruptedExceptionorg.jivesoftware.smack.SmackException.NotLoggedInExceptionpublic MamManager.MamQueryResult queryArchiveWithEndDate(java.util.Date end) throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException, java.lang.InterruptedException, org.jivesoftware.smack.SmackException.NotLoggedInException
end - org.jivesoftware.smack.SmackException.NoResponseExceptionorg.jivesoftware.smack.XMPPException.XMPPErrorExceptionorg.jivesoftware.smack.SmackException.NotConnectedExceptionjava.lang.InterruptedExceptionorg.jivesoftware.smack.SmackException.NotLoggedInExceptionpublic MamManager.MamQueryResult queryArchive(java.lang.Integer max, java.util.Date start, java.util.Date end, org.jxmpp.jid.Jid withJid, java.util.List<org.jivesoftware.smackx.xdata.FormField> additionalFields) throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException, java.lang.InterruptedException, org.jivesoftware.smack.SmackException.NotLoggedInException
max - start - end - withJid - additionalFields - org.jivesoftware.smack.SmackException.NoResponseExceptionorg.jivesoftware.smack.XMPPException.XMPPErrorExceptionorg.jivesoftware.smack.SmackException.NotConnectedExceptionjava.lang.InterruptedExceptionorg.jivesoftware.smack.SmackException.NotLoggedInExceptionpublic MamManager.MamQueryResult queryArchive(java.lang.String node, java.lang.Integer max, java.util.Date start, java.util.Date end, org.jxmpp.jid.Jid withJid, java.util.List<org.jivesoftware.smackx.xdata.FormField> additionalFields) throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException, java.lang.InterruptedException, org.jivesoftware.smack.SmackException.NotLoggedInException
node - The PubSub node name, can be nullmax - start - end - withJid - additionalFields - org.jivesoftware.smack.SmackException.NoResponseExceptionorg.jivesoftware.smack.XMPPException.XMPPErrorExceptionorg.jivesoftware.smack.SmackException.NotConnectedExceptionjava.lang.InterruptedExceptionorg.jivesoftware.smack.SmackException.NotLoggedInExceptionpublic MamManager.MamQueryResult page(org.jivesoftware.smackx.xdata.packet.DataForm dataForm, org.jivesoftware.smackx.rsm.packet.RSMSet rsmSet) throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException, java.lang.InterruptedException, org.jivesoftware.smack.SmackException.NotLoggedInException
dataForm - rsmSet - org.jivesoftware.smack.SmackException.NoResponseExceptionorg.jivesoftware.smack.XMPPException.XMPPErrorExceptionorg.jivesoftware.smack.SmackException.NotConnectedExceptionjava.lang.InterruptedExceptionorg.jivesoftware.smack.SmackException.NotLoggedInExceptionpublic MamManager.MamQueryResult page(java.lang.String node, org.jivesoftware.smackx.xdata.packet.DataForm dataForm, org.jivesoftware.smackx.rsm.packet.RSMSet rsmSet) throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException, java.lang.InterruptedException, org.jivesoftware.smack.SmackException.NotLoggedInException
node - The PubSub node name, can be nulldataForm - rsmSet - org.jivesoftware.smack.SmackException.NoResponseExceptionorg.jivesoftware.smack.XMPPException.XMPPErrorExceptionorg.jivesoftware.smack.SmackException.NotConnectedExceptionjava.lang.InterruptedExceptionorg.jivesoftware.smack.SmackException.NotLoggedInExceptionpublic MamManager.MamQueryResult pageNext(MamManager.MamQueryResult mamQueryResult, int count) throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException, java.lang.InterruptedException, org.jivesoftware.smack.SmackException.NotLoggedInException
mamQueryResult - is the previous query resultcount - is the amount of messages that a page containsorg.jivesoftware.smack.SmackException.NoResponseExceptionorg.jivesoftware.smack.XMPPException.XMPPErrorExceptionorg.jivesoftware.smack.SmackException.NotConnectedExceptionjava.lang.InterruptedExceptionorg.jivesoftware.smack.SmackException.NotLoggedInExceptionpublic MamManager.MamQueryResult pagePrevious(MamManager.MamQueryResult mamQueryResult, int count) throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException, java.lang.InterruptedException, org.jivesoftware.smack.SmackException.NotLoggedInException
mamQueryResult - is the previous query resultcount - is the amount of messages that a page containsorg.jivesoftware.smack.SmackException.NoResponseExceptionorg.jivesoftware.smack.XMPPException.XMPPErrorExceptionorg.jivesoftware.smack.SmackException.NotConnectedExceptionjava.lang.InterruptedExceptionorg.jivesoftware.smack.SmackException.NotLoggedInExceptionpublic MamManager.MamQueryResult pageBefore(org.jxmpp.jid.Jid chatJid, java.lang.String messageUid, int max) throws org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotLoggedInException, org.jivesoftware.smack.SmackException.NotConnectedException, java.lang.InterruptedException, org.jivesoftware.smack.SmackException.NoResponseException
Note that the messageUid is the XEP-0313 UID and not the stanza ID of the message.
chatJid - messageUid - the UID of the message of which messages before should be received.max - org.jivesoftware.smack.XMPPException.XMPPErrorExceptionorg.jivesoftware.smack.SmackException.NotLoggedInExceptionorg.jivesoftware.smack.SmackException.NotConnectedExceptionjava.lang.InterruptedExceptionorg.jivesoftware.smack.SmackException.NoResponseExceptionpublic MamManager.MamQueryResult pageAfter(org.jxmpp.jid.Jid chatJid, java.lang.String messageUid, int max) throws org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotLoggedInException, org.jivesoftware.smack.SmackException.NotConnectedException, java.lang.InterruptedException, org.jivesoftware.smack.SmackException.NoResponseException
Note that the messageUid is the XEP-0313 UID and not the stanza ID of the message.
chatJid - messageUid - the UID of the message of which messages after should be received.max - org.jivesoftware.smack.XMPPException.XMPPErrorExceptionorg.jivesoftware.smack.SmackException.NotLoggedInExceptionorg.jivesoftware.smack.SmackException.NotConnectedExceptionjava.lang.InterruptedExceptionorg.jivesoftware.smack.SmackException.NoResponseExceptionpublic MamManager.MamQueryResult mostRecentPage(org.jxmpp.jid.Jid chatJid, int max) throws org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotLoggedInException, org.jivesoftware.smack.SmackException.NotConnectedException, java.lang.InterruptedException, org.jivesoftware.smack.SmackException.NoResponseException
chatJid - max - org.jivesoftware.smack.XMPPException.XMPPErrorExceptionorg.jivesoftware.smack.SmackException.NotLoggedInExceptionorg.jivesoftware.smack.SmackException.NotConnectedExceptionjava.lang.InterruptedExceptionorg.jivesoftware.smack.SmackException.NoResponseExceptionpublic java.util.List<org.jivesoftware.smackx.xdata.FormField> retrieveFormFields()
throws org.jivesoftware.smack.SmackException.NoResponseException,
org.jivesoftware.smack.XMPPException.XMPPErrorException,
org.jivesoftware.smack.SmackException.NotConnectedException,
java.lang.InterruptedException,
org.jivesoftware.smack.SmackException.NotLoggedInException
org.jivesoftware.smack.SmackException.NoResponseExceptionorg.jivesoftware.smack.XMPPException.XMPPErrorExceptionorg.jivesoftware.smack.SmackException.NotConnectedExceptionjava.lang.InterruptedExceptionorg.jivesoftware.smack.SmackException.NotLoggedInExceptionpublic java.util.List<org.jivesoftware.smackx.xdata.FormField> retrieveFormFields(java.lang.String node)
throws org.jivesoftware.smack.SmackException.NoResponseException,
org.jivesoftware.smack.XMPPException.XMPPErrorException,
org.jivesoftware.smack.SmackException.NotConnectedException,
java.lang.InterruptedException,
org.jivesoftware.smack.SmackException.NotLoggedInException
node - The PubSub node name, can be nullorg.jivesoftware.smack.SmackException.NoResponseExceptionorg.jivesoftware.smack.XMPPException.XMPPErrorExceptionorg.jivesoftware.smack.SmackException.NotConnectedExceptionjava.lang.InterruptedExceptionorg.jivesoftware.smack.SmackException.NotLoggedInExceptionpublic boolean isSupported()
throws org.jivesoftware.smack.SmackException.NoResponseException,
org.jivesoftware.smack.XMPPException.XMPPErrorException,
org.jivesoftware.smack.SmackException.NotConnectedException,
java.lang.InterruptedException
falseotherwhise.org.jivesoftware.smack.SmackException.NoResponseExceptionorg.jivesoftware.smack.XMPPException.XMPPErrorExceptionorg.jivesoftware.smack.SmackException.NotConnectedExceptionjava.lang.InterruptedException@Deprecated
public boolean isSupportedByServer()
throws org.jivesoftware.smack.SmackException.NoResponseException,
org.jivesoftware.smack.XMPPException.XMPPErrorException,
org.jivesoftware.smack.SmackException.NotConnectedException,
java.lang.InterruptedException
isSupported() instead.org.jivesoftware.smack.SmackException.NotConnectedExceptionorg.jivesoftware.smack.XMPPException.XMPPErrorExceptionorg.jivesoftware.smack.SmackException.NoResponseExceptionjava.lang.InterruptedExceptionpublic MamManager.MamPrefsResult retrieveArchivingPreferences() throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException, java.lang.InterruptedException, org.jivesoftware.smack.SmackException.NotLoggedInException
org.jivesoftware.smack.SmackException.NoResponseExceptionorg.jivesoftware.smack.XMPPException.XMPPErrorExceptionorg.jivesoftware.smack.SmackException.NotConnectedExceptionjava.lang.InterruptedExceptionorg.jivesoftware.smack.SmackException.NotLoggedInExceptionpublic MamManager.MamPrefsResult updateArchivingPreferences(java.util.List<org.jxmpp.jid.Jid> alwaysJids, java.util.List<org.jxmpp.jid.Jid> neverJids, MamPrefsIQ.DefaultBehavior defaultBehavior) throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException, java.lang.InterruptedException, org.jivesoftware.smack.SmackException.NotLoggedInException
alwaysJids - is the list of JIDs that should always have messages to/from
archived in the user's storeneverJids - is the list of JIDs that should never have messages to/from
archived in the user's storedefaultBehavior - can be "roster", "always", "never" (see XEP-0313)org.jivesoftware.smack.SmackException.NoResponseExceptionorg.jivesoftware.smack.XMPPException.XMPPErrorExceptionorg.jivesoftware.smack.SmackException.NotConnectedExceptionjava.lang.InterruptedExceptionorg.jivesoftware.smack.SmackException.NotLoggedInException