Smack

org.jivesoftware.smackx.packet
Class OfflineMessageRequest

java.lang.Object
  extended by org.jivesoftware.smack.packet.Packet
      extended by org.jivesoftware.smack.packet.IQ
          extended by org.jivesoftware.smackx.packet.OfflineMessageRequest

public class OfflineMessageRequest
extends IQ

Represents a request to get some or all the offline messages of a user. This class can also be used for deleting some or all the offline messages of a user.

Author:
Gaston Dombiak

Nested Class Summary
static class OfflineMessageRequest.Item
          Item child that holds information about offline messages to view or delete.
static class OfflineMessageRequest.Provider
           
 
Nested classes/interfaces inherited from class org.jivesoftware.smack.packet.IQ
IQ.Type
 
Field Summary
 
Fields inherited from class org.jivesoftware.smack.packet.Packet
ID_NOT_AVAILABLE
 
Constructor Summary
OfflineMessageRequest()
           
 
Method Summary
 void addItem(OfflineMessageRequest.Item item)
          Adds an item child that holds information about offline messages to view or delete.
 String getChildElementXML()
          Returns the sub-element XML section of the IQ packet, or null if there isn't one.
 Iterator getItems()
          Returns an Iterator for item childs that holds information about offline messages to view or delete.
 boolean isFetch()
          Returns true if all the offline messages of the user should be retrieved.
 boolean isPurge()
          Returns true if all the offline messages of the user should be deleted.
 void setFetch(boolean fetch)
          Sets if all the offline messages of the user should be retrieved.
 void setPurge(boolean purge)
          Sets if all the offline messages of the user should be deleted.
 
Methods inherited from class org.jivesoftware.smack.packet.IQ
getType, setType, toXML
 
Methods inherited from class org.jivesoftware.smack.packet.Packet
addExtension, deleteProperty, getError, getExtension, getExtension, getExtensions, getExtensionsXML, getFrom, getPacketID, getProperty, getPropertyNames, getTo, removeExtension, setError, setFrom, setPacketID, setProperty, setTo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OfflineMessageRequest

public OfflineMessageRequest()
Method Detail

getItems

public Iterator getItems()
Returns an Iterator for item childs that holds information about offline messages to view or delete.

Returns:
an Iterator for item childs that holds information about offline messages to view or delete.

addItem

public void addItem(OfflineMessageRequest.Item item)
Adds an item child that holds information about offline messages to view or delete.

Parameters:
item - the item child that holds information about offline messages to view or delete.

isPurge

public boolean isPurge()
Returns true if all the offline messages of the user should be deleted.

Returns:
true if all the offline messages of the user should be deleted.

setPurge

public void setPurge(boolean purge)
Sets if all the offline messages of the user should be deleted.

Parameters:
purge - true if all the offline messages of the user should be deleted.

isFetch

public boolean isFetch()
Returns true if all the offline messages of the user should be retrieved.

Returns:
true if all the offline messages of the user should be retrieved.

setFetch

public void setFetch(boolean fetch)
Sets if all the offline messages of the user should be retrieved.

Parameters:
fetch - true if all the offline messages of the user should be retrieved.

getChildElementXML

public String getChildElementXML()
Description copied from class: IQ
Returns the sub-element XML section of the IQ packet, or null if there isn't one. Packet extensions must be included, if any are defined.

Extensions of this class must override this method.

Specified by:
getChildElementXML in class IQ
Returns:
the child element section of the IQ XML.

Smack

Copyright © 2003-2007 Jive Software.