mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-12-22 02:27:58 +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");
|
AbstractXMPPConnection connection = new XMPPTCPConnection("mtucker", "password", "jabber.org");
|
||||||
connection.connect().login();
|
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);
|
connection.sendStanza(message);
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue