Smack

org.jivesoftware.smackx.packet
Class ChatStateExtension

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

public class ChatStateExtension
extends Object
implements PacketExtension

Represents a chat state which is an extension to message packets which is used to indicate the current status of a chat participant.

Author:
Alexander Wenckus
See Also:
ChatState

Nested Class Summary
static class ChatStateExtension.Provider
           
 
Constructor Summary
ChatStateExtension(ChatState state)
          Default constructor.
 
Method Summary
 String getElementName()
          Returns the root element name.
 String getNamespace()
          Returns the root element XML namespace.
 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

ChatStateExtension

public ChatStateExtension(ChatState state)
Default constructor. The argument provided is the state that the extension will represent.

Parameters:
state - the state that the extension represents.
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.

Smack

Copyright © 2003-2007 Jive Software.