1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-12-22 12:37:58 +01:00

[javadoc-overview] Use stanza factory in example code

This commit is contained in:
Florian Schmaus 2021-03-25 12:16:04 +01:00
parent 2dab49f048
commit 406daa78f7

View file

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