public final class Credentials
extends java.lang.Object
implements java.io.Serializable, android.os.Parcelable
The credentials are unmodifiable.
| Modifier and Type | Field and Description |
|---|---|
static android.os.Parcelable.Creator<Credentials> |
CREATOR |
static long |
THRESHOLD
The threshold which is used to check if the credentials are still valid.
|
| Constructor and Description |
|---|
Credentials(java.lang.String credentials)
Constructor which takes as input the formatted string as provided by the wallee API.
|
| Modifier and Type | Method and Description |
|---|---|
void |
checkCredentials(Credentials other)
This method checks if the provided
other credential is a valid replacement of this
credentials. |
int |
describeContents() |
java.lang.String |
getCredentials() |
long |
getSpaceId() |
long |
getTimestamp() |
long |
getTransactionId() |
boolean |
isValid() |
java.lang.String |
toString() |
void |
writeToParcel(android.os.Parcel dest,
int flags) |
public static final long THRESHOLD
public static final android.os.Parcelable.Creator<Credentials> CREATOR
public Credentials(java.lang.String credentials)
throws InvalidCredentialsException
credentials - the credential string which should be parsed.InvalidCredentialsException - thrown when the provided credential string is not valid.public java.lang.String toString()
toString in class java.lang.Objectpublic void writeToParcel(android.os.Parcel dest,
int flags)
writeToParcel in interface android.os.Parcelablepublic int describeContents()
describeContents in interface android.os.Parcelablepublic boolean isValid()
true when the credentials are still valid otherwise the method returns false.public void checkCredentials(Credentials other) throws java.lang.IllegalStateException
other credential is a valid replacement of this
credentials. Means the method checks whether the other credentials belongs to the
same transaction as this.other - the other credential pair which should be checked.java.lang.IllegalStateException - thrown when the provided other is not a valid
replacement.public java.lang.String getCredentials()
public long getTransactionId()
public long getSpaceId()
public long getTimestamp()