Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.protocol.jabber.extensions.coin
Class StatePacketExtension

java.lang.Object
  extended by net.java.sip.communicator.impl.protocol.jabber.extensions.AbstractPacketExtension
      extended by net.java.sip.communicator.impl.protocol.jabber.extensions.coin.StatePacketExtension
All Implemented Interfaces:
org.jivesoftware.smack.packet.PacketExtension

public class StatePacketExtension
extends AbstractPacketExtension

State packet extension.

Author:
Sebastien Vincent

Field Summary
static String ELEMENT_ACTIVE
          Active element name.
static String ELEMENT_LOCKED
          Locked element name.
static String ELEMENT_NAME
          The name of the element that contains the state data.
static String ELEMENT_USER_COUNT
          Users count element name.
static String NAMESPACE
          The namespace that state belongs to.
 
Fields inherited from class net.java.sip.communicator.impl.protocol.jabber.extensions.AbstractPacketExtension
attributes
 
Constructor Summary
StatePacketExtension()
          Constructor.
 
Method Summary
 int getActive()
          Get the active state.
 int getLocked()
          Get the locked state.
 int getUserCount()
          Get the user count.
 void setActive(int active)
          Set the active state.
 void setLocked(int locked)
          Set the locked state.
 void setUserCount(int userCount)
          Set the user count.
 String toXML()
          Get an XML string representation.
 
Methods inherited from class net.java.sip.communicator.impl.protocol.jabber.extensions.AbstractPacketExtension
addChildExtension, getAttribute, getAttributeAsInt, getAttributeAsInt, getAttributeAsString, getAttributeAsURI, getAttributeNames, getChildExtensions, getChildExtensionsOfType, getElementName, getFirstChildOfType, getNamespace, getText, removeAttribute, setAttribute, setNamespace, setText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAMESPACE

public static final String NAMESPACE
The namespace that state belongs to.


ELEMENT_NAME

public static final String ELEMENT_NAME
The name of the element that contains the state data.

See Also:
Constant Field Values

ELEMENT_USER_COUNT

public static final String ELEMENT_USER_COUNT
Users count element name.

See Also:
Constant Field Values

ELEMENT_ACTIVE

public static final String ELEMENT_ACTIVE
Active element name.

See Also:
Constant Field Values

ELEMENT_LOCKED

public static final String ELEMENT_LOCKED
Locked element name.

See Also:
Constant Field Values
Constructor Detail

StatePacketExtension

public StatePacketExtension()
Constructor.

Method Detail

setUserCount

public void setUserCount(int userCount)
Set the user count.

Parameters:
userCount - user count

setActive

public void setActive(int active)
Set the active state.

Parameters:
active - state

setLocked

public void setLocked(int locked)
Set the locked state.

Parameters:
locked - locked state

getUserCount

public int getUserCount()
Get the user count.

Returns:
user count

getActive

public int getActive()
Get the active state.

Returns:
active state

getLocked

public int getLocked()
Get the locked state.

Returns:
locked state

toXML

public String toXML()
Get an XML string representation.

Specified by:
toXML in interface org.jivesoftware.smack.packet.PacketExtension
Overrides:
toXML in class AbstractPacketExtension
Returns:
XML string representation

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.