1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2025-12-14 00:51:19 +01:00

Add StanzaIdFilter, deprecate PacketIDFilter

This commit is contained in:
Florian Schmaus 2015-02-19 14:59:44 +01:00
parent 2856b8ace6
commit 7ebea7ce94
10 changed files with 73 additions and 29 deletions

View file

@ -26,26 +26,6 @@ import org.jivesoftware.smack.util.StringUtils;
* A Version IQ packet, which is used by XMPP clients to discover version information
* about the software running at another entity's JID.<p>
*
* An example to discover the version of the server:
* <pre>
* // Request the version from the server.
* Version versionRequest = new Version();
* timeRequest.setType(IQ.Type.get);
* timeRequest.setTo("example.com");
*
* // Create a packet collector to listen for a response.
* PacketCollector collector = con.createPacketCollector(
* new PacketIDFilter(versionRequest.getStanzaId()));
*
* con.sendPacket(versionRequest);
*
* // Wait up to 5 seconds for a result.
* IQ result = (IQ)collector.nextResult(5000);
* if (result != null && result.getType() == IQ.Type.result) {
* Version versionResult = (Version)result;
* // Do something with result...
* }</pre><p>
*
* @author Gaston Dombiak
*/
public class Version extends IQ {