Class ClientSoftwareVersionManager
- java.lang.Object
-
- rocks.xmpp.core.stanza.AbstractIQHandler
-
- rocks.xmpp.extensions.version.SoftwareVersionProtocol
-
- rocks.xmpp.extensions.version.client.ClientSoftwareVersionManager
-
- All Implemented Interfaces:
ExtensionProtocol
,IQHandler
,DiscoverableInfo
,SoftwareInfoProvider<SoftwareVersion>
,SoftwareVersionManager
public final class ClientSoftwareVersionManager extends SoftwareVersionProtocol implements SoftwareVersionManager
This manager implements XEP-0092: Software Version.If enabled and a software version has been set, it automatically responds to inbound queries for the software version.
It also allows to query for the software version of another entity.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SoftwareVersion
getSoftwareVersion()
Gets my own software version.AsyncResult<SoftwareVersion>
getSoftwareVersion(Jid jid)
Gets the software version of another entity.void
setSoftwareInfo(SoftwareVersion softwareVersion)
Gets the software information.void
setSoftwareVersion(SoftwareVersion softwareVersion)
Sets my own software version.-
Methods inherited from class rocks.xmpp.extensions.version.SoftwareVersionProtocol
getFeatures, getNamespace, getSoftwareInfo, isEnabled
-
Methods inherited from class rocks.xmpp.core.stanza.AbstractIQHandler
getPayloadClass, handleRequest
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface rocks.xmpp.extensions.disco.model.info.DiscoverableInfo
getExtensions, getFeatures, getIdentities
-
Methods inherited from interface rocks.xmpp.core.ExtensionProtocol
getNamespace, isEnabled
-
Methods inherited from interface rocks.xmpp.extensions.softwareinfo.SoftwareInfoProvider
getSoftwareInfo
-
-
-
-
Method Detail
-
getSoftwareVersion
public AsyncResult<SoftwareVersion> getSoftwareVersion(Jid jid)
Gets the software version of another entity.- Specified by:
getSoftwareVersion
in interfaceSoftwareVersionManager
- Parameters:
jid
- The JID of the entity you want get the software version from. You can also pass null, if you want to get the server's software version.- Returns:
- The async result with the software version or null, if this protocol is not supported.
-
getSoftwareVersion
public SoftwareVersion getSoftwareVersion()
Description copied from interface:SoftwareVersionManager
Gets my own software version.- Specified by:
getSoftwareVersion
in interfaceSoftwareVersionManager
- Returns:
- My software version.
- See Also:
SoftwareVersionManager.setSoftwareVersion(SoftwareVersion)
-
setSoftwareVersion
public void setSoftwareVersion(SoftwareVersion softwareVersion)
Description copied from interface:SoftwareVersionManager
Sets my own software version. The set version is returned when this handler is queried for the software version.- Specified by:
setSoftwareVersion
in interfaceSoftwareVersionManager
- Parameters:
softwareVersion
- My software version.- See Also:
SoftwareVersionManager.getSoftwareVersion()
-
setSoftwareInfo
public void setSoftwareInfo(SoftwareVersion softwareVersion)
Description copied from interface:SoftwareInfoProvider
Gets the software information.- Specified by:
setSoftwareInfo
in interfaceSoftwareInfoProvider<SoftwareVersion>
- Overrides:
setSoftwareInfo
in classSoftwareVersionProtocol
- Parameters:
softwareVersion
- The software information.
-
-