public enum TokenError extends Enum<TokenError>
Enum Constant and Description |
---|
NO_SUBSCRIPTION
indicates error due to user not having a subscription.
|
SUBSCRIPTION_EXPIRED
indicates error due to user's subscription expired.
|
TOKEN_FETCH_ERROR
indicates error in fetching music token, say due to developer token invalid/exipred.
|
UNKNOWN
indicates an unknown error in fetching music token.
|
USER_CANCELLED
indicates error due to user cancelling the authentication flow.
|
Modifier and Type | Method and Description |
---|---|
int |
getErrorCode() |
static TokenError |
getErrorFromValue(int tokenError) |
static TokenError |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static TokenError[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final TokenError NO_SUBSCRIPTION
public static final TokenError SUBSCRIPTION_EXPIRED
public static final TokenError TOKEN_FETCH_ERROR
public static final TokenError UNKNOWN
public static final TokenError USER_CANCELLED
public int getErrorCode()
public static TokenError getErrorFromValue(int tokenError)
public static TokenError valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static TokenError[] values()
for (TokenError c : TokenError.values()) System.out.println(c);