|
Smack | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jivesoftware.smackx.OfflineMessageManager
public class OfflineMessageManager
The OfflineMessageManager helps manage offline messages even before the user has sent an available presence. When a user asks for his offline messages before sending an available presence then the server will not send a flood with all the offline messages when the user becomes online. The server will not send a flood with all the offline messages to the session that made the offline messages request or to any other session used by the user that becomes online.
Once the session that made the offline messages request has been closed and the user becomes offline in all the resources then the server will resume storing the messages offline and will send all the offline messages to the user when he becomes online. Therefore, the server will flood the user when he becomes online unless the user uses this class to manage his offline messages.
Constructor Summary | |
---|---|
OfflineMessageManager(XMPPConnection connection)
|
Method Summary | |
---|---|
void |
deleteMessages()
Deletes all offline messages of the user. |
void |
deleteMessages(List<String> nodes)
Deletes the specified list of offline messages. |
Iterator<OfflineMessageHeader> |
getHeaders()
Returns an iterator on OfflineMessageHeader that keep information about the offline message. |
int |
getMessageCount()
Returns the number of offline messages for the user of the connection. |
Iterator<Message> |
getMessages()
Returns an Iterator with all the offline Messages of the user. |
Iterator<Message> |
getMessages(List<String> nodes)
Returns an Iterator with the offline Messages whose stamp matches the specified request. |
boolean |
supportsFlexibleRetrieval()
Returns true if the server supports Flexible Offline Message Retrieval. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OfflineMessageManager(XMPPConnection connection)
Method Detail |
---|
public boolean supportsFlexibleRetrieval() throws XMPPException
XMPPException
- If the user is not allowed to make this request.public int getMessageCount() throws XMPPException
XMPPException
- If the user is not allowed to make this request or the server does
not support offline message retrieval.public Iterator<OfflineMessageHeader> getHeaders() throws XMPPException
XMPPException
- If the user is not allowed to make this request or the server does
not support offline message retrieval.public Iterator<Message> getMessages(List<String> nodes) throws XMPPException
deleteMessages(java.util.List)
to delete the messages.
nodes
- the list of stamps that uniquely identifies offline message.
XMPPException
- If the user is not allowed to make this request or the server does
not support offline message retrieval.public Iterator<Message> getMessages() throws XMPPException
deleteMessages(java.util.List)
to delete the messages.
XMPPException
- If the user is not allowed to make this request or the server does
not support offline message retrieval.public void deleteMessages(List<String> nodes) throws XMPPException
nodes
- the list of stamps that uniquely identifies offline message.
XMPPException
- If the user is not allowed to make this request or the server does
not support offline message retrieval.public void deleteMessages() throws XMPPException
XMPPException
- If the user is not allowed to make this request or the server does
not support offline message retrieval.
|
Smack | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |