XMPP Client library Smack version 4.0.6
Chszs, reprint need to indicate. Blog home:Http://blog.csdn.net/chszs
I. Overview of the SMACK Library
Smack is an open-source, easy-to-use Xmpp/jabber client library that is developed in the Java language and developed by Jive Software.
The advantage of smack is that programming is simple.
Smack's disadvantage is that its API is not designed for a large number of concurrent users, each customer needs 1 threads, occupy a relatively high resource, so when using smack for simulation testing, 1 machines can only simulate a limited (thousands of) customers.
As of November 27, 2014, the Smack Library has been developed to 4.0. Version 6.
The latest good news is that smack will support the Android system directly after the 4.1.0 release, without the need to use the previous smack ported Asmack library.
Smack Library source is hosted on GitHub, home see: https://github.com/igniterealtime/Smack/
Ii. Changes in Smack 4
Smack Library from 3.4 to 4.0.x version, its API has a large change, mainly:
1. Rename the connection class to Xmppconnection class
The Xmppconnection class is the parent class of the Xmpptcpconnection class and the Xmppboshconnection class.
2, the various provider class has been subcontracting
3. Keep-alive (persistent connection) mechanism moved from the Smack-core library to the Smack-extensions library
The keep-alive mechanism is now provided by the Pingmanager class.
4. The ToString () method of the Privacylist class is renamed to GetName ()
5. When all references to the chat instance are removed, the Chat.close () method should be called
Otherwise, the chat object will have a hidden memory leak, until the Chatmanager object is reclaimed by the garbage collector and the memory leaks are hidden.
6, Servertrustmanager class was removed
If you want to use XMPP with SSL authentication, you only need to provide your own Sslcontext object to the Connectionconfiguration object.
7, Packet.setproperty () moved from the Smack-core library to the Smack-extensions library
Its API can now be found in the Org.jivesoftware.smackx.jiveproperties package.
8. Connection.getaccountmanager () method is now changed to Accountmanager.getinstance (Xmppconnection) method
9, the exception API has been improved
10, Tocontains filter was removed
XMPP Client library Smack version 4.0.6