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 VersionManager
getInstanceFor
(XMPPConnection connection) getVersion
(Jid jid) Request version information from a given JID.boolean
isSupported
(Jid jid) static void
setAutoAppendSmackVersion
(boolean autoAppendSmackVersion) static void
setDefaultVersion
(String name, String version) static void
setDefaultVersion
(String name, String version, String os) void
setVersion
(String name, String version) void
setVersion
(String name, String version, String os) void
Methods 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
null
if 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.
-