public class AsyncLinkedNetworkManager<T extends LinkedGenericJson>
Wraps the LinkedNetworkManager public methods in asynchronous functionality using native Android AsyncTask.
This functionality can be accessed through the com.kinvey.android.Client.linkedData} convenience method. The first String parameter is the name of the Collection, and the Class is the expected Response Class.
The methods provided in this class take two (optional) callbacks, a KinveyClientCallback
for the NetworkManager request as well as a UploaderProgressListener
or DownloaderProgressListener
for updates on the NetworkFileManager status
The functionality of this class is provided by both the com.kinvey.java.network.NetworkManager
API as well as the com.kinvey.java.network.NetworkFileManager
API.
Modifier and Type | Class and Description |
---|---|
static class |
AsyncLinkedNetworkManager.Get<T extends LinkedGenericJson> |
static class |
AsyncLinkedNetworkManager.GetEntity<T extends LinkedGenericJson> |
static class |
AsyncLinkedNetworkManager.Save<T extends LinkedGenericJson> |
Constructor and Description |
---|
AsyncLinkedNetworkManager(java.lang.String collectionName,
java.lang.Class<T> myClass,
Client<?> client)
Wraps the LinkedNetworkManager public methods in asynchronous functionality using native Android AsyncTask.
|
Modifier and Type | Method and Description |
---|---|
void |
get(com.kinvey.java.Query query,
KinveyListCallback<T> callback,
com.kinvey.java.core.DownloaderProgressListener download,
com.kinvey.java.store.StoreType storeType)
Method to get an entity or entities and download ALL associated Linked Resources.
|
void |
get(com.kinvey.java.Query query,
KinveyListCallback<T> callback,
com.kinvey.java.core.DownloaderProgressListener download,
java.lang.String[] resolves,
int resolve_depth,
boolean retain,
com.kinvey.java.store.StoreType storeType)
Method to get an entity or entities and download ALL associated Linked Resources.
|
void |
get(KinveyListCallback<T> callback,
com.kinvey.java.core.DownloaderProgressListener download,
com.kinvey.java.store.StoreType storeType)
Method to get an entity or entities and download ALL associated Linked Resources.
|
void |
getEntity(java.lang.String entityID,
com.kinvey.java.core.KinveyClientCallback<T> callback,
com.kinvey.java.core.DownloaderProgressListener download,
com.kinvey.java.store.StoreType storeType)
Method to get an entity or entities and download a subset of associated Linked Resources.
|
void |
save(T entity,
com.kinvey.java.core.KinveyClientCallback<T> callback,
com.kinvey.java.core.UploaderProgressListener upload,
com.kinvey.java.store.StoreType storeType)
Save (create or update) an entity to a collection and upload ALL associated Linked Resources.
|
public AsyncLinkedNetworkManager(java.lang.String collectionName, java.lang.Class<T> myClass, Client<?> client)
Wraps the LinkedNetworkManager public methods in asynchronous functionality using native Android AsyncTask.
This functionality can be accessed through the com.kinvey.android.Client.linkedData} convenience method. The first String parameter is the name of the Collection, and the Class is the expected Response Class.
The methods provided in this class take two (optional) callbacks, a KinveyClientCallback
for the NetworkManager request as well as a UploaderProgressListener
or DownloaderProgressListener
for updates on the NetworkFileManager status
The functionality of this class is provided by both the com.kinvey.java.network.NetworkManager
API as well as the com.kinvey.java.network.NetworkFileManager
API.
public void getEntity(java.lang.String entityID, com.kinvey.java.core.KinveyClientCallback<T> callback, com.kinvey.java.core.DownloaderProgressListener download, com.kinvey.java.store.StoreType storeType)
Method to get an entity or entities and download a subset of associated Linked Resources.
Pass null to entityID to return all entities in a collection. Use the DownloaderProgressListener
to retrieve callback information about the NetworkFileManager downloads.
This method will only download Linked Resources for the fields declared in the resources array. These Strings must match the strings used as keys in the entity.
entityID
- entityID to getdownload
- used for progress updates as associated files are downloaded.
IOException
- if there is an issue executing the client requests
public void get(com.kinvey.java.Query query, KinveyListCallback<T> callback, com.kinvey.java.core.DownloaderProgressListener download, com.kinvey.java.store.StoreType storeType)
Method to get an entity or entities and download ALL associated Linked Resources.
Pass null to entityID to return all entities in a collection. Use the DownloaderProgressListener
to retrieve callback information about the NetworkFileManager downloads.
This method will only download Linked Resources for the fields declared in the resources array. These Strings must match the strings used as keys in the entity.
query
- query for entities to retrievedownload
- used for progress updates as associated files are downloaded.
IOException
- if there is an issue executing the client requests
public void get(com.kinvey.java.Query query, KinveyListCallback<T> callback, com.kinvey.java.core.DownloaderProgressListener download, java.lang.String[] resolves, int resolve_depth, boolean retain, com.kinvey.java.store.StoreType storeType)
Method to get an entity or entities and download ALL associated Linked Resources.
Pass null to entityID to return all entities in a collection. Use the DownloaderProgressListener
to retrieve callback information about the NetworkFileManager downloads.
This method will only download Linked Resources for the fields declared in the resources array. These Strings must match the strings used as keys in the entity.
query
- query for entities to retrievedownload
- used for progress updates as associated files are downloaded.
IOException
- if there is an issue executing the client requests
public void get(KinveyListCallback<T> callback, com.kinvey.java.core.DownloaderProgressListener download, com.kinvey.java.store.StoreType storeType)
Method to get an entity or entities and download ALL associated Linked Resources.
Pass null to entityID to return all entities in a collection. Use the DownloaderProgressListener
to retrieve callback information about the NetworkFileManager downloads.
This method will only download Linked Resources for the fields declared in the resources array. These Strings must match the strings used as keys in the entity.
download
- used for progress updates as associated files are downloaded.
IOException
- if there is an issue executing the client requests
public void save(T entity, com.kinvey.java.core.KinveyClientCallback<T> callback, com.kinvey.java.core.UploaderProgressListener upload, com.kinvey.java.store.StoreType storeType)
Save (create or update) an entity to a collection and upload ALL associated Linked Resources.
This method will only upload Linked Resources for the fields declared in the resources array. These Strings must match the strings used as keys in the entity.
entity
- Entity to Saveupload
- Listener for uploading Linked Resources, can be null.
IOException
- if there is an issue executing the client requests