Smack

org.jivesoftware.smackx.packet
Class MUCUser

java.lang.Object
  extended by org.jivesoftware.smackx.packet.MUCUser
All Implemented Interfaces:
PacketExtension

public class MUCUser
extends Object
implements PacketExtension

Represents extended presence information about roles, affiliations, full JIDs, or status codes scoped by the 'http://jabber.org/protocol/muc#user' namespace.

Author:
Gaston Dombiak

Nested Class Summary
static class MUCUser.Decline
          Represents a rejection to an invitation from another user to a room.
static class MUCUser.Destroy
          Represents a notification that the room has been destroyed.
static class MUCUser.Invite
          Represents an invitation for another user to a room.
static class MUCUser.Item
          Item child that holds information about roles, affiliation, jids and nicks.
static class MUCUser.Status
          Status code assists in presenting notification messages.
 
Constructor Summary
MUCUser()
           
 
Method Summary
 MUCUser.Decline getDecline()
          Returns the rejection to an invitation from another user to a room.
 MUCUser.Destroy getDestroy()
          Returns the notification that the room has been destroyed.
 String getElementName()
          Returns the root element name.
 MUCUser.Invite getInvite()
          Returns the invitation for another user to a room.
 MUCUser.Item getItem()
          Returns the item child that holds information about roles, affiliation, jids and nicks.
 String getNamespace()
          Returns the root element XML namespace.
 String getPassword()
          Returns the password to use to enter Password-Protected Room.
 MUCUser.Status getStatus()
          Returns the status which holds a code that assists in presenting notification messages.
 void setDecline(MUCUser.Decline decline)
          Sets the rejection to an invitation from another user to a room.
 void setDestroy(MUCUser.Destroy destroy)
          Sets the notification that the room has been destroyed.
 void setInvite(MUCUser.Invite invite)
          Sets the invitation for another user to a room.
 void setItem(MUCUser.Item item)
          Sets the item child that holds information about roles, affiliation, jids and nicks.
 void setPassword(String string)
          Sets the password to use to enter Password-Protected Room.
 void setStatus(MUCUser.Status status)
          Sets the status which holds a code that assists in presenting notification messages.
 String toXML()
          Returns the XML reppresentation of the PacketExtension.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MUCUser

public MUCUser()
Method Detail

getElementName

public String getElementName()
Description copied from interface: PacketExtension
Returns the root element name.

Specified by:
getElementName in interface PacketExtension
Returns:
the element name.

getNamespace

public String getNamespace()
Description copied from interface: PacketExtension
Returns the root element XML namespace.

Specified by:
getNamespace in interface PacketExtension
Returns:
the namespace.

toXML

public String toXML()
Description copied from interface: PacketExtension
Returns the XML reppresentation of the PacketExtension.

Specified by:
toXML in interface PacketExtension
Returns:
the packet extension as XML.

getInvite

public MUCUser.Invite getInvite()
Returns the invitation for another user to a room. The sender of the invitation must be an occupant of the room. The invitation will be sent to the room which in turn will forward the invitation to the invitee.

Returns:
an invitation for another user to a room.

getDecline

public MUCUser.Decline getDecline()
Returns the rejection to an invitation from another user to a room. The rejection will be sent to the room which in turn will forward the refusal to the inviter.

Returns:
a rejection to an invitation from another user to a room.

getItem

public MUCUser.Item getItem()
Returns the item child that holds information about roles, affiliation, jids and nicks.

Returns:
an item child that holds information about roles, affiliation, jids and nicks.

getPassword

public String getPassword()
Returns the password to use to enter Password-Protected Room. A Password-Protected Room is a room that a user cannot enter without first providing the correct password.

Returns:
the password to use to enter Password-Protected Room.

getStatus

public MUCUser.Status getStatus()
Returns the status which holds a code that assists in presenting notification messages.

Returns:
the status which holds a code that assists in presenting notification messages.

getDestroy

public MUCUser.Destroy getDestroy()
Returns the notification that the room has been destroyed. After a room has been destroyed, the room occupants will receive a Presence packet of type 'unavailable' with the reason for the room destruction if provided by the room owner.

Returns:
a notification that the room has been destroyed.

setInvite

public void setInvite(MUCUser.Invite invite)
Sets the invitation for another user to a room. The sender of the invitation must be an occupant of the room. The invitation will be sent to the room which in turn will forward the invitation to the invitee.

Parameters:
invite - the invitation for another user to a room.

setDecline

public void setDecline(MUCUser.Decline decline)
Sets the rejection to an invitation from another user to a room. The rejection will be sent to the room which in turn will forward the refusal to the inviter.

Parameters:
decline - the rejection to an invitation from another user to a room.

setItem

public void setItem(MUCUser.Item item)
Sets the item child that holds information about roles, affiliation, jids and nicks.

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

setPassword

public void setPassword(String string)
Sets the password to use to enter Password-Protected Room. A Password-Protected Room is a room that a user cannot enter without first providing the correct password.

Parameters:
string - the password to use to enter Password-Protected Room.

setStatus

public void setStatus(MUCUser.Status status)
Sets the status which holds a code that assists in presenting notification messages.

Parameters:
status - the status which holds a code that assists in presenting notification messages.

setDestroy

public void setDestroy(MUCUser.Destroy destroy)
Sets the notification that the room has been destroyed. After a room has been destroyed, the room occupants will receive a Presence packet of type 'unavailable' with the reason for the room destruction if provided by the room owner.

Parameters:
destroy - the notification that the room has been destroyed.

Smack

Copyright © 2003-2007 Jive Software.