Smack

org.jivesoftware.smackx.packet
Class MUCInitialPresence

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

public class MUCInitialPresence
extends Object
implements PacketExtension

Represents extended presence information whose sole purpose is to signal the ability of the occupant to speak the MUC protocol when joining a room. If the room requires a password then the MUCInitialPresence should include one.

The amount of discussion history provided on entering a room (perhaps because the user is on a low-bandwidth connection or is using a small-footprint client) could be managed by setting a configured History instance to the MUCInitialPresence instance.

Author:
Gaston Dombiak
See Also:
setHistory(MUCInitialPresence.History).

Nested Class Summary
static class MUCInitialPresence.History
          The History class controls the number of characters or messages to receive when entering a room.
 
Constructor Summary
MUCInitialPresence()
           
 
Method Summary
 String getElementName()
          Returns the root element name.
 MUCInitialPresence.History getHistory()
          Returns the history that manages the amount of discussion history provided on entering a room.
 String getNamespace()
          Returns the root element XML namespace.
 String getPassword()
          Returns the password to use when the room requires a password.
 void setHistory(MUCInitialPresence.History history)
          Sets the History that manages the amount of discussion history provided on entering a room.
 void setPassword(String password)
          Sets the password to use when the room requires a password.
 String toXML()
          Returns the XML representation of the PacketExtension.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MUCInitialPresence

public MUCInitialPresence()
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 representation of the PacketExtension.

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

getHistory

public MUCInitialPresence.History getHistory()
Returns the history that manages the amount of discussion history provided on entering a room.

Returns:
the history that manages the amount of discussion history provided on entering a room.

getPassword

public String getPassword()
Returns the password to use when the room requires a password.

Returns:
the password to use when the room requires a password.

setHistory

public void setHistory(MUCInitialPresence.History history)
Sets the History that manages the amount of discussion history provided on entering a room.

Parameters:
history - that manages the amount of discussion history provided on entering a room.

setPassword

public void setPassword(String password)
Sets the password to use when the room requires a password.

Parameters:
password - the password to use when the room requires a password.

Smack

Copyright © 2003-2007 Jive Software.