java.lang.Object | |||||
↳ | java.util.AbstractMap<K, V> | ||||
↳ | com.google.api.client.util.GenericData | ||||
↳ | com.kinvey.java.core.AbstractKinveyClientRequest<T> | ||||
↳ | com.kinvey.java.core.AbstractKinveyJsonClientRequest<T> | ||||
↳ | com.kinvey.java.offline.AbstractKinveyOfflineClientRequest<T> |
![]() |
![]() |
Implementation of a Client Request, which can either pull a response from a Cache instance or from online.
Behavior is determined by a CachePolicy
, which must be set along with an instance of a Cache
.
This class provides all available functionality through public methods, but most of the implementation is handled by the specified cache policy.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | TEMPID |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
T |
execute()
@return
| ||||||||||
static String |
generateMongoDBID()
Generate a unique mongodb style id.
| ||||||||||
static String | getUUID() | ||||||||||
T |
offlineFromService(boolean assumeOnline)
This method retrieves an entity from the service.
| ||||||||||
T |
offlineFromStore()
This method retrieves an entity from the offline store.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
@return
IOException |
---|
Generate a unique mongodb style id.
Offline requires all entities to have an `_id` field, so if one doesn't exist this method can be used to generate oneThis method retrieves an entity from the service. If assumeOnline is true, then the method will throw any connection errors. If assumeOnline is false, then the method will catch the error and attempt to return the entity from the store.
assumeOnline | - should execution assume the user is online (and return errors if they aren't)? |
---|
IOException |
---|
This method retrieves an entity from the offline store.
This method is synchronized on an object lock, providing threadsafe access to the store.IOException |
---|