Smack

org.jivesoftware.smack.packet
Class Registration

java.lang.Object
  extended by org.jivesoftware.smack.packet.Packet
      extended by org.jivesoftware.smack.packet.IQ
          extended by org.jivesoftware.smack.packet.Registration

public class Registration
extends IQ

Represents registration packets. An empty GET query will cause the server to return information about it's registration support. SET queries can be used to create accounts or update existing account information. XMPP servers may require a number of attributes to be set when creating a new account. The standard account attributes are as follows:

Author:
Matt Tucker

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jivesoftware.smack.packet.IQ
IQ.Type
 
Field Summary
 
Fields inherited from class org.jivesoftware.smack.packet.Packet
DEFAULT_LANGUAGE, ID_NOT_AVAILABLE
 
Constructor Summary
Registration()
           
 
Method Summary
 Map<String,String> getAttributes()
          Returns the map of String key/value pairs of account attributes.
 String getChildElementXML()
          Returns the sub-element XML section of the IQ packet, or null if there isn't one.
 String getInstructions()
          Returns the registration instructions, or null if no instructions have been set.
 void setAttributes(Map<String,String> attributes)
          Sets the account attributes.
 void setInstructions(String instructions)
          Sets the registration instructions.
 
Methods inherited from class org.jivesoftware.smack.packet.IQ
createErrorResponse, createResultIQ, getType, setType, toXML
 
Methods inherited from class org.jivesoftware.smack.packet.Packet
addExtension, deleteProperty, equals, getDefaultLanguage, getError, getExtension, getExtension, getExtensions, getExtensionsXML, getFrom, getPacketID, getProperty, getPropertyNames, getTo, getXmlns, hashCode, nextID, removeExtension, setDefaultXmlns, setError, setFrom, setPacketID, setProperty, setTo
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Registration

public Registration()
Method Detail

getInstructions

public String getInstructions()
Returns the registration instructions, or null if no instructions have been set. If present, instructions should be displayed to the end-user that will complete the registration process.

Returns:
the registration instructions, or null if there are none.

setInstructions

public void setInstructions(String instructions)
Sets the registration instructions.

Parameters:
instructions - the registration instructions.

getAttributes

public Map<String,String> getAttributes()
Returns the map of String key/value pairs of account attributes.

Returns:
the account attributes.

setAttributes

public void setAttributes(Map<String,String> attributes)
Sets the account attributes. The map must only contain String key/value pairs.

Parameters:
attributes - the account attributes.

getChildElementXML

public String getChildElementXML()
Description copied from class: IQ
Returns the sub-element XML section of the IQ packet, or null if there isn't one. Packet extensions must be included, if any are defined.

Extensions of this class must override this method.

Specified by:
getChildElementXML in class IQ
Returns:
the child element section of the IQ XML.

Smack

Copyright © 2003-2007 Jive Software.