Package rocks.xmpp.extensions.vcard.temp
Class VCardManager
- java.lang.Object
-
- rocks.xmpp.core.session.Manager
-
- rocks.xmpp.extensions.vcard.temp.VCardManager
-
- All Implemented Interfaces:
ExtensionProtocol
,DiscoverableInfo
public final class VCardManager extends Manager implements ExtensionProtocol, DiscoverableInfo
This manager allows to retrieve or save one owns vCard or retrieve another user's vCard.The use cases are also described in XEP-0054: vcard-temp in more detail.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<String>
getFeatures()
Gets the features.String
getNamespace()
The protocol's main namespace.AsyncResult<VCard>
getVCard()
Gets the vCard of the current user.AsyncResult<VCard>
getVCard(Jid jid)
Gets the vCard of another user.AsyncResult<Void>
setVCard(VCard vCard)
Saves or updates a vCard.-
Methods inherited from class rocks.xmpp.core.session.Manager
isEnabled, setEnabled
-
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, getIdentities
-
Methods inherited from interface rocks.xmpp.core.ExtensionProtocol
isEnabled
-
-
-
-
Method Detail
-
getVCard
public AsyncResult<VCard> getVCard()
Gets the vCard of the current user.- Returns:
- The async result with the vCard.
-
getVCard
public AsyncResult<VCard> getVCard(Jid jid)
Gets the vCard of another user.- Parameters:
jid
- The user's JID.- Returns:
- The async result of the vCard which may be null, if it does not exist.
-
setVCard
public AsyncResult<Void> setVCard(VCard vCard)
Saves or updates a vCard.- Parameters:
vCard
- The vCard.- Returns:
- The async result.
-
getNamespace
public final String getNamespace()
Description copied from interface:ExtensionProtocol
The protocol's main namespace. This is used to uniquely identify the extension protocol.- Specified by:
getNamespace
in interfaceExtensionProtocol
- Returns:
- The main namespace.
-
getFeatures
public final Set<String> getFeatures()
Description copied from interface:DiscoverableInfo
Gets the features.- Specified by:
getFeatures
in interfaceDiscoverableInfo
- Returns:
- The features.
-
-