Smack

org.jivesoftware.smackx.packet
Class MUCOwner

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

public class MUCOwner
extends IQ

IQ packet that serves for granting and revoking ownership privileges, granting and revoking administrative privileges and destroying a room. All these operations are scoped by the 'http://jabber.org/protocol/muc#owner' namespace.

Author:
Gaston Dombiak

Nested Class Summary
static class MUCOwner.Destroy
          Represents a request to the server to destroy a room.
static class MUCOwner.Item
          Item child that holds information about affiliation, jids and nicks.
 
Nested classes/interfaces inherited from class org.jivesoftware.smack.packet.IQ
IQ.Type
 
Field Summary
 
Fields inherited from class org.jivesoftware.smack.packet.Packet
DEFAULT_LANGUAGE, ID_NOT_AVAILABLE
 
Constructor Summary
MUCOwner()
           
 
Method Summary
 void addItem(MUCOwner.Item item)
          Adds an item child that holds information about affiliation, jids and nicks.
 String getChildElementXML()
          Returns the sub-element XML section of the IQ packet, or null if there isn't one.
 MUCOwner.Destroy getDestroy()
          Returns a request to the server to destroy a room.
 Iterator getItems()
          Returns an Iterator for item childs that holds information about affiliation, jids and nicks.
 void setDestroy(MUCOwner.Destroy destroy)
          Sets a request to the server to destroy a room.
 
Methods inherited from class org.jivesoftware.smack.packet.IQ
createErrorResponse, createResultIQ, getType, setType, toXML
 
Methods inherited from class org.jivesoftware.smack.packet.Packet
addExtension, deleteProperty, equals, getDefaultLanguage, getError, getExtension, getExtension, getExtensions, getExtensionsXML, getFrom, getPacketID, getProperty, getPropertyNames, getTo, getXmlns, hashCode, nextID, removeExtension, setDefaultXmlns, setError, setFrom, setPacketID, setProperty, setTo
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MUCOwner

public MUCOwner()
Method Detail

getItems

public Iterator getItems()
Returns an Iterator for item childs that holds information about affiliation, jids and nicks.

Returns:
an Iterator for item childs that holds information about affiliation, jids and nicks.

getDestroy

public MUCOwner.Destroy getDestroy()
Returns a request to the server to destroy a room. The sender of the request should be the room's owner. If the sender of the destroy request is not the room's owner then the server will answer a "Forbidden" error.

Returns:
a request to the server to destroy a room.

setDestroy

public void setDestroy(MUCOwner.Destroy destroy)
Sets a request to the server to destroy a room. The sender of the request should be the room's owner. If the sender of the destroy request is not the room's owner then the server will answer a "Forbidden" error.

Parameters:
destroy - the request to the server to destroy a room.

addItem

public void addItem(MUCOwner.Item item)
Adds an item child that holds information about affiliation, jids and nicks.

Parameters:
item - the item child that holds information about affiliation, jids and nicks.

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.