Package io.agora.rtc2
Enum Class Constants.RenewTokenErrorCode
- All Implemented Interfaces:
Serializable,Comparable<Constants.RenewTokenErrorCode>,Constable
- Enclosing class:
- Constants
Error codes for renewing a token.
These error codes indicate the result of calling renewToken.
- Since:
- 4.6.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription6: The token renewal was canceled because a new request was made, and the previous one was canceled.1: The token renewal failed because of some unknown server error.5: The token renewal failed because the app ID in the token does not match the current app ID.4: The token renewal failed because the channel name is invalid.3: The token renewal failed because the token is not valid.0: The token is renewed successfully.2: The token renewal failed because the provided token has expired. -
Method Summary
Modifier and TypeMethodDescriptionfromInt(int v) static intReturns the enum constant of this class with the specified name.static Constants.RenewTokenErrorCode[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
RENEW_TOKEN_SUCCESS
0: The token is renewed successfully. -
RENEW_TOKEN_FAILURE
1: The token renewal failed because of some unknown server error. It is recommended that the user check the parameters passed in when generating the token and generate a new token and retry renewToken. -
RENEW_TOKEN_TOKEN_EXPIRED
2: The token renewal failed because the provided token has expired. It is recommended that the user generate a new token with a longer expiration time and retry renewToken. -
RENEW_TOKEN_INVALID_TOKEN
3: The token renewal failed because the token is not valid. Typical reasons include:- The App Certificate for the project is enabled in Agora Console, but you do not use a token when joining the channel. If you enable the App Certificate, you must use a token to join the channel.
- The uid that you specify in the `joinChannel` method is different from the uid that you pass for generating the token.
- The channel name that you specify in the `joinChannel` method is different from the channel name that you pass for generating the token.
-
RENEW_TOKEN_INVALID_CHANNEL_NAME
4: The token renewal failed because the channel name is invalid. It is recommended that the user check the channel name, generate a new token, and retry renewToken. -
RENEW_TOKEN_INCONSISTENT_APPID
5: The token renewal failed because the app ID in the token does not match the current app ID. It is recommended that the user check the app ID, generate a new token, and retry renewToken. -
RENEW_TOKEN_CANCELED_BY_NEW_REQUEST
6: The token renewal was canceled because a new request was made, and the previous one was canceled.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getValue
-
fromInt
-