public class OfflineMessageManager
extends java.lang.Object
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 and Description |
---|
OfflineMessageManager(XMPPConnection connection) |
Modifier and Type | Method and Description |
---|---|
void |
deleteMessages()
Deletes all offline messages of the user.
|
void |
deleteMessages(java.util.List nodes)
Deletes the specified list of offline messages.
|
java.util.Iterator |
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.
|
java.util.Iterator |
getMessages()
Returns an Iterator with all the offline Messages of the user.
|
java.util.Iterator |
getMessages(java.util.List 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.
|
public OfflineMessageManager(XMPPConnection connection)
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 java.util.Iterator getHeaders() throws XMPPException
XMPPException
- If the user is not allowed to make this request or the server does
not support offline message retrieval.public java.util.Iterator getMessages(java.util.List 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 java.util.Iterator 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(java.util.List 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.Copyright © 2003 Jive Software.