Class VersionManager
java.lang.Object
org.jivesoftware.smack.Manager
org.jivesoftware.smackx.iqversion.VersionManager
A Version Manager that automatically responds to version IQs with a predetermined reply.
The VersionManager takes care of handling incoming version request IQs, according to XEP-0092 (Software Version). You can configure the version reply for a given connection by running the following code:
Version MY_VERSION = new Version("My Little XMPP Application", "v1.23", "OS/2 32-bit");
VersionManager.getInstanceFor(mConnection).setVersion(MY_VERSION);
-
Method Summary
Modifier and TypeMethodDescriptionstatic VersionManagergetInstanceFor(XMPPConnection connection) getVersion(Jid jid) Request version information from a given JID.booleanisSupported(Jid jid) static voidsetAutoAppendSmackVersion(boolean autoAppendSmackVersion) static voidsetDefaultVersion(String name, String version) static voidsetDefaultVersion(String name, String version, String os) voidsetVersion(String name, String version) voidsetVersion(String name, String version, String os) voidMethods inherited from class org.jivesoftware.smack.Manager
connection, getAuthenticatedConnectionOrThrow, schedule, schedule, scheduleBlocking
-
Method Details
-
setDefaultVersion
-
setDefaultVersion
-
getInstanceFor
-
setAutoAppendSmackVersion
-
setVersion
-
setVersion
-
unsetVersion
-
isSupported
public boolean isSupported(Jid jid) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException -
getVersion
public Version getVersion(Jid jid) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException Request version information from a given JID.- Parameters:
jid- TODO javadoc me please- Returns:
- the version information or
nullif not supported by JID - Throws:
SmackException.NoResponseException- if there was no response from the remote entity.XMPPException.XMPPErrorException- if there was an XMPP error returned.SmackException.NotConnectedException- if the XMPP connection is not connected.InterruptedException- if the calling thread was interrupted.
-