Understanding the basic object in smack-Registry

Source: Internet
Author: User

1. Introduction to the Registry class

Registration is a subclass of the IQ of the Information Query package. Therefore, it also contains four attributes that indicate the operation type: Get/set. When the type attribute is get, indicates to obtain the registration object information from the server, while the set type indicates to create a user or update the account information of an existing user. When creating a new account, the XMPP server requires a series of other attribute values. The standard attribute values are listed as follows:

Name: User Name

First: the user's surname

Last: User Name

Email: email address

City: City

State: State

ZIP: Zip code

Phone: mobile phone number

URL: Your Personal Homepage

Date: Registration Date

Misc: related text information

Remove: indicates whether the account is disabled.

 

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:
• name -- the user's name.
• first -- the user's first name.
• last -- the user's last name.
• email -- the user's email address.
• City -- the user's city.
• state -- the user's state.
• zip -- the user's zip code.
• phone -- the user's phone number.
• URL -- the user's website.
• date -- the date the registration took place.
• MISC -- other miscellaneous information to associate with the account.
• text -- textual information to associate with the account.
• Remove -- empty flag to remove account.

 

2. Common Methods

Set and obtain the key-value pairs of the registered account.

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.
--------------------------------------------------------------------------------

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.