public final class RequestToken extends java.lang.Object implements android.os.Parcelable, java.lang.Comparable<RequestToken>
Modifier and Type | Field and Description |
---|---|
static android.os.Parcelable.Creator<RequestToken> |
CREATOR |
Modifier and Type | Method and Description |
---|---|
boolean |
abort() |
<R> BaasResult<R> |
await() |
boolean |
cancel() |
int |
compareTo(RequestToken another) |
int |
describeContents() |
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
static RequestToken |
loadAndResume(android.os.Bundle bundle,
java.lang.String name,
BaasHandler<?> handler)
Loads a request token from the bundle
and immediately tries to resume the request with handler
|
boolean |
resume(BaasHandler<?> handler)
Resumes a suspended asynchronous request, with the new
provided handler
|
boolean |
suspend()
Tries to suspend the asynchronous request identified
by this token.
|
boolean |
suspendAndSave(android.os.Bundle bundle,
java.lang.String name)
Suspends a request and immediately save it in a bundle
|
void |
writeToParcel(android.os.Parcel dest,
int flags) |
public static android.os.Parcelable.Creator<RequestToken> CREATOR
public static RequestToken loadAndResume(android.os.Bundle bundle, java.lang.String name, BaasHandler<?> handler)
bundle
- a non null bundlename
- the key of the saved tokenhandler
- a handler to resume the request with.public boolean resume(BaasHandler<?> handler)
handler
- a handler to resume the request with.public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public int compareTo(RequestToken another)
compareTo
in interface java.lang.Comparable<RequestToken>
public int describeContents()
describeContents
in interface android.os.Parcelable
public void writeToParcel(android.os.Parcel dest, int flags)
writeToParcel
in interface android.os.Parcelable
public boolean abort()
public <R> BaasResult<R> await()
public boolean cancel()
public boolean suspendAndSave(android.os.Bundle bundle, java.lang.String name)
bundle
- a non null bundlename
- the key to save the token withpublic boolean suspend()