Class PrivateDataManager


  • public final class PrivateDataManager
    extends Manager
    This class implements XEP-0049: Private XML Storage.

    It allows to retrieve and store private data in the server's private XML storage.

    This class is thread-safe.

    • Method Detail

      • getData

        public final <T> AsyncResult<T> getData​(Class<T> type)
        Gets private data, which is stored on the server.
        Type Parameters:
        T - The type of private data.
        Parameters:
        type - The class of the private data. Note that this class needs a no-arg default constructor.
        Returns:
        The async result with the list of stored items of the given type.
      • storeData

        public final AsyncResult<Void> storeData​(Object privateData)
        Stores private data.
        Parameters:
        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.
        Returns:
        The async result.