public class DataProvider
extends java.lang.Object
GluonObservableObject
and
GluonObservableList
. All operations on the DataProvider happen in an asynchronous background thread. You can
use the properties on the GluonObservable
entity to get information about the progress
of the operation.Constructor and Description |
---|
DataProvider() |
Modifier and Type | Method and Description |
---|---|
static <T> void |
removeObject(GluonObservableObject<T> observable,
ObjectDataRemover<T> remover)
Remove the provided GluonObservableObject using the specified ObjectDataRemover.
|
static <E> GluonObservableList<E> |
retrieveList(ListDataReader<E> reader)
Retrieves a list using the specified ListDataReader.
|
static <T> GluonObservableObject<T> |
retrieveObject(ObjectDataReader<T> reader)
Retrieves an object using the specified ObjectDataReader.
|
static <T> GluonObservableObject<T> |
storeObject(T object,
ObjectDataWriter<T> writer)
Writes the object by using the specified ObjectDataWriter.
|
public static <T> GluonObservableObject<T> storeObject(T object, ObjectDataWriter<T> writer)
T
- the type of the object to storeobject
- the object to storewriter
- the writer to use for storing the objectpublic static <T> GluonObservableObject<T> retrieveObject(ObjectDataReader<T> reader)
T
- the type of the object to retrievereader
- the reader to use for retrieving the objectpublic static <T> void removeObject(GluonObservableObject<T> observable, ObjectDataRemover<T> remover)
ConnectState.REMOVED
and the contained object will be set to
null
when the remove operation completed successfully.T
- the type of the object that is contained in the GluonObservableObjectobservable
- the observable to removeremover
- the remover to use for removing the objectpublic static <E> GluonObservableList<E> retrieveList(ListDataReader<E> reader)
E
- the type of the objects inside the listreader
- the reader to use for retrieving the list