mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-22 06:12:05 +01:00
[javadoc-overview] Use stanza factory in example code
This commit is contained in:
parent
2dab49f048
commit
406daa78f7
1 changed files with 6 additions and 1 deletions
|
@ -14,7 +14,12 @@
|
|||
AbstractXMPPConnection connection = new XMPPTCPConnection("mtucker", "password", "jabber.org");
|
||||
connection.connect().login();
|
||||
|
||||
Message message = new Message("jsmith@igniterealtime.org", "Howdy! How are you?");
|
||||
Message message = connection.getStanzaFactory()
|
||||
.buildMessageStanza()
|
||||
.to("jsmith@igniterealtime.org")
|
||||
.setBody("Howdy! How are you?")
|
||||
.build();
|
||||
|
||||
connection.sendStanza(message);
|
||||
</pre>
|
||||
|
||||
|
|
Loading…
Reference in a new issue