Smack

org.jivesoftware.smackx.packet
Class Nick

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

public class Nick
extends Object
implements PacketExtension

A minimalistic implementation of a PacketExtension for nicknames.

Author:
Guus der Kinderen, guus.der.kinderen@gmail.com
See Also:
XEP-0172: User Nickname

Nested Class Summary
static class Nick.Provider
           
 
Field Summary
static String ELEMENT_NAME
           
static String NAMESPACE
           
 
Constructor Summary
Nick(String name)
           
 
Method Summary
 String getElementName()
          Returns the root element name.
 String getName()
          The value of this nickname
 String getNamespace()
          Returns the root element XML namespace.
 void setName(String name)
          Sets the value of this nickname
 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
 

Field Detail

NAMESPACE

public static final String NAMESPACE
See Also:
Constant Field Values

ELEMENT_NAME

public static final String ELEMENT_NAME
See Also:
Constant Field Values
Constructor Detail

Nick

public Nick(String name)
Method Detail

getName

public String getName()
The value of this nickname

Returns:
the nickname

setName

public void setName(String name)
Sets the value of this nickname

Parameters:
name - the name to set

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.