mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-09 00:59:39 +02:00
Apply builder pattern to ConnectionConfiguration
Introducing a clean split between the constant connection configuration parameters, which are now all in ConnectionConfiguration and the dynamic connection state (e.g. hostAddresses) which are now in AbstractXMPPConnection. Also removed all arguments of login() since the username, password, resource and callback handler need now to be configured via ConnectionConfiguration. Also remove documentation/extensions/messageevents.md, as it's already in documentation/legacy
This commit is contained in:
parent
69f387b344
commit
c81cd34561
24 changed files with 760 additions and 708 deletions
|
@ -12,9 +12,9 @@ Smack Key Advantages
|
|||
* Extremely simple to use, yet powerful API. Sending a text message to a user can be accomplished in only a few lines of code:
|
||||
|
||||
```java
|
||||
AbstractXMPPConnection connection = new XMPPTCPConnection("jabber.org");
|
||||
AbstractXMPPConnection connection = new XMPPTCPConnection("mtucker", "password", "jabber.org");
|
||||
connection.connect();
|
||||
connection.login("mtucker", "password");
|
||||
connection.login();
|
||||
Chat chat = ChatManager.getInstanceFor(connection)
|
||||
.createChat("jsmith@jivesoftware.com", new MessageListener() {
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue