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 |
isSupportedByServer()
Returns true if Message Archive Management is supported by the server.
|
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.NoResponseException
org.jivesoftware.smack.XMPPException.XMPPErrorException
org.jivesoftware.smack.SmackException.NotConnectedException
java.lang.InterruptedException
org.jivesoftware.smack.SmackException.NotLoggedInException
public 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.NoResponseException
org.jivesoftware.smack.XMPPException.XMPPErrorException
org.jivesoftware.smack.SmackException.NotConnectedException
java.lang.InterruptedException
org.jivesoftware.smack.SmackException.NotLoggedInException
public 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.NoResponseException
org.jivesoftware.smack.XMPPException.XMPPErrorException
org.jivesoftware.smack.SmackException.NotConnectedException
java.lang.InterruptedException
org.jivesoftware.smack.SmackException.NotLoggedInException
public 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.NoResponseException
org.jivesoftware.smack.XMPPException.XMPPErrorException
org.jivesoftware.smack.SmackException.NotConnectedException
java.lang.InterruptedException
org.jivesoftware.smack.SmackException.NotLoggedInException
public 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.NoResponseException
org.jivesoftware.smack.XMPPException.XMPPErrorException
org.jivesoftware.smack.SmackException.NotConnectedException
java.lang.InterruptedException
org.jivesoftware.smack.SmackException.NotLoggedInException
public 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.NoResponseException
org.jivesoftware.smack.XMPPException.XMPPErrorException
org.jivesoftware.smack.SmackException.NotConnectedException
java.lang.InterruptedException
org.jivesoftware.smack.SmackException.NotLoggedInException
public 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.NoResponseException
org.jivesoftware.smack.XMPPException.XMPPErrorException
org.jivesoftware.smack.SmackException.NotConnectedException
java.lang.InterruptedException
org.jivesoftware.smack.SmackException.NotLoggedInException
public 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.NoResponseException
org.jivesoftware.smack.XMPPException.XMPPErrorException
org.jivesoftware.smack.SmackException.NotConnectedException
java.lang.InterruptedException
org.jivesoftware.smack.SmackException.NotLoggedInException
public 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.NoResponseException
org.jivesoftware.smack.XMPPException.XMPPErrorException
org.jivesoftware.smack.SmackException.NotConnectedException
java.lang.InterruptedException
org.jivesoftware.smack.SmackException.NotLoggedInException
public 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.NoResponseException
org.jivesoftware.smack.XMPPException.XMPPErrorException
org.jivesoftware.smack.SmackException.NotConnectedException
java.lang.InterruptedException
org.jivesoftware.smack.SmackException.NotLoggedInException
public 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.NoResponseException
org.jivesoftware.smack.XMPPException.XMPPErrorException
org.jivesoftware.smack.SmackException.NotConnectedException
java.lang.InterruptedException
org.jivesoftware.smack.SmackException.NotLoggedInException
public 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.NoResponseException
org.jivesoftware.smack.XMPPException.XMPPErrorException
org.jivesoftware.smack.SmackException.NotConnectedException
java.lang.InterruptedException
org.jivesoftware.smack.SmackException.NotLoggedInException
public 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.XMPPErrorException
org.jivesoftware.smack.SmackException.NotLoggedInException
org.jivesoftware.smack.SmackException.NotConnectedException
java.lang.InterruptedException
org.jivesoftware.smack.SmackException.NoResponseException
public 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.XMPPErrorException
org.jivesoftware.smack.SmackException.NotLoggedInException
org.jivesoftware.smack.SmackException.NotConnectedException
java.lang.InterruptedException
org.jivesoftware.smack.SmackException.NoResponseException
public 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.XMPPErrorException
org.jivesoftware.smack.SmackException.NotLoggedInException
org.jivesoftware.smack.SmackException.NotConnectedException
java.lang.InterruptedException
org.jivesoftware.smack.SmackException.NoResponseException
public 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.NoResponseException
org.jivesoftware.smack.XMPPException.XMPPErrorException
org.jivesoftware.smack.SmackException.NotConnectedException
java.lang.InterruptedException
org.jivesoftware.smack.SmackException.NotLoggedInException
public 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.NoResponseException
org.jivesoftware.smack.XMPPException.XMPPErrorException
org.jivesoftware.smack.SmackException.NotConnectedException
java.lang.InterruptedException
org.jivesoftware.smack.SmackException.NotLoggedInException
public boolean isSupportedByServer() throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException, java.lang.InterruptedException
org.jivesoftware.smack.SmackException.NotConnectedException
org.jivesoftware.smack.XMPPException.XMPPErrorException
org.jivesoftware.smack.SmackException.NoResponseException
java.lang.InterruptedException
public 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.NoResponseException
org.jivesoftware.smack.XMPPException.XMPPErrorException
org.jivesoftware.smack.SmackException.NotConnectedException
java.lang.InterruptedException
org.jivesoftware.smack.SmackException.NotLoggedInException
public 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.NoResponseException
org.jivesoftware.smack.XMPPException.XMPPErrorException
org.jivesoftware.smack.SmackException.NotConnectedException
java.lang.InterruptedException
org.jivesoftware.smack.SmackException.NotLoggedInException