public final class PrivateDataManager extends ExtensionManager
It allows to retrieve and store private data in the server's private XML storage.
This class is thread-safe.| Modifier and Type | Method and Description |
|---|---|
<T> T |
getData(Class<T> type)
Gets private data, which is stored on the server.
|
void |
storeData(Object privateData)
Stores private data.
|
isEnabled, setEnabledpublic final <T> T getData(Class<T> type) throws XmppException
T - The type of private data.type - The class of the private data. Note that this class needs a no-arg default constructor.StanzaException - If the server returned an error, e.g. if the used namespace is reserved.NoResponseException - If the entity did not respond.XmppExceptionpublic final void storeData(Object privateData) throws XmppException
privateData - The private data. The class of this object must be annotated with JAXB annotations and must known to the XMPP context in order to marshal und unmarshal it.StanzaException - If the entity returned a stanza error.NoResponseException - If the entity did not respond.XmppExceptionCopyright © 2014–2015 XMPP.rocks. All rights reserved.