public final class OfflineMessageManager extends ExtensionManager
Offline Message Retrieval must be used before sending initial presence, in order to tell the server, that it must not flood the client with offline messages later.
Enabling or disabling this manager has no effect.| Modifier and Type | Method and Description |
|---|---|
boolean |
isSupported()
Discovers support for flexible offline message retrieval.
|
void |
removeAllMessages()
Removes all offline messages.
|
void |
removeMessages(String... ids)
Removes specific offline messages.
|
void |
requestAllMessages()
Requests all offline messages.
|
void |
requestMessage(String id)
Requests a specific offline message.
|
List<OfflineMessageHeader> |
requestMessageHeaders()
Gets the offline message headers.
|
int |
requestNumberOfMessages()
Gets the number of offline messages.
|
isEnabled, setEnabledpublic boolean isSupported()
throws XmppException
StanzaException - If the server returned a stanza error.NoResponseException - If the server did not respond.XmppExceptionpublic int requestNumberOfMessages()
throws XmppException
StanzaException - If the server returned a stanza error.NoResponseException - If the server did not respond.XmppExceptionpublic List<OfflineMessageHeader> requestMessageHeaders() throws XmppException
StanzaException - If the server returned a stanza error.NoResponseException - If the server did not respond.XmppExceptionpublic void requestMessage(String id) throws XmppException
OfflineMessage extension, which can be used to match the id OfflineMessage.getId().id - The offline message id, which corresponds to OfflineMessageHeader.getId()StanzaException - If the server returned a stanza error.NoResponseException - If the server did not respond.XmppExceptionpublic void removeMessages(String... ids) throws XmppException
ids - The offline message ids, which correspond to OfflineMessageHeader.getId()StanzaException - If the server returned a stanza error.NoResponseException - If the server did not respond.XmppExceptionpublic void requestAllMessages()
throws XmppException
StanzaException - If the server returned a stanza error.NoResponseException - If the server did not respond.XmppExceptionpublic void removeAllMessages()
throws XmppException
StanzaException - If the server returned a stanza error.NoResponseException - If the server did not respond.XmppExceptionCopyright © 2014–2015 XMPP.rocks. All rights reserved.