public final class VersionManager extends Manager
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);
Modifier and Type | Method and Description |
---|---|
static VersionManager |
getInstanceFor(XMPPConnection connection) |
Version |
getVersion(org.jxmpp.jid.Jid jid)
Request version information from a given JID.
|
boolean |
isSupported(org.jxmpp.jid.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 |
unsetVersion() |
connection, getAuthenticatedConnectionOrThrow, schedule
public static void setDefaultVersion(String name, String version)
public static void setDefaultVersion(String name, String version, String os)
public static VersionManager getInstanceFor(XMPPConnection connection)
public static void setAutoAppendSmackVersion(boolean autoAppendSmackVersion)
public void setVersion(String name, String version)
public void setVersion(String name, String version, String os)
public void unsetVersion()
public boolean isSupported(org.jxmpp.jid.Jid jid) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException
public Version getVersion(org.jxmpp.jid.Jid jid) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException
jid
- null
if not supported by JIDSmackException.NoResponseException
XMPPException.XMPPErrorException
SmackException.NotConnectedException
InterruptedException