Package im.zego.zegoexpress.constants
Enum ZegoRoomStateChangedReason
- java.lang.Object
-
- java.lang.Enum<ZegoRoomStateChangedReason>
-
- im.zego.zegoexpress.constants.ZegoRoomStateChangedReason
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<ZegoRoomStateChangedReason>
public enum ZegoRoomStateChangedReason extends java.lang.Enum<ZegoRoomStateChangedReason>
Room state change reason.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description KICK_OUT
Kicked out of the room by the server.LOGIN_FAILED
Failed to log in to the room.LOGINED
Log in to the room successfully.LOGINING
Logging in to the room.LOGOUT
Logout of the room is successful.LOGOUT_FAILED
Failed to log out of the room.RECONNECT_FAILED
The room fails to reconnect.RECONNECTED
The room is successfully reconnected.RECONNECTING
The room connection is temporarily interrupted.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ZegoRoomStateChangedReason
getZegoRoomStateChangedReason(int value)
int
value()
static ZegoRoomStateChangedReason
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static ZegoRoomStateChangedReason[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
LOGINING
public static final ZegoRoomStateChangedReason LOGINING
Logging in to the room. When calling [loginRoom] to log in to the room or [switchRoom] to switch to the target room, it will enter this state, indicating that it is requesting to connect to the server. The application interface is usually displayed through this state.
-
LOGINED
public static final ZegoRoomStateChangedReason LOGINED
Log in to the room successfully. When the room is successfully logged in or switched, it will enter this state, indicating that the login to the room has been successful, and users can normally receive callback notifications of other users in the room and all stream information additions and deletions.
-
LOGIN_FAILED
public static final ZegoRoomStateChangedReason LOGIN_FAILED
Failed to log in to the room. When the login or switch room fails, it will enter this state, indicating that the login or switch room has failed, for example, AppID or Token is incorrect, etc.
-
RECONNECTING
public static final ZegoRoomStateChangedReason RECONNECTING
The room connection is temporarily interrupted. If the interruption occurs due to poor network quality, the SDK will retry internally.
-
RECONNECTED
public static final ZegoRoomStateChangedReason RECONNECTED
The room is successfully reconnected. If there is an interruption due to poor network quality, the SDK will retry internally, and enter this state after successful reconnection.
-
RECONNECT_FAILED
public static final ZegoRoomStateChangedReason RECONNECT_FAILED
The room fails to reconnect. If there is an interruption due to poor network quality, the SDK will retry internally, and enter this state after the reconnection fails.
-
KICK_OUT
public static final ZegoRoomStateChangedReason KICK_OUT
Kicked out of the room by the server. For example, if you log in to the room with the same user name in other places, and the local end is kicked out of the room, it will enter this state.
-
LOGOUT
public static final ZegoRoomStateChangedReason LOGOUT
Logout of the room is successful. It is in this state by default before logging into the room. When calling [logoutRoom] to log out of the room successfully or [switchRoom] to log out of the current room successfully, it will enter this state.
-
LOGOUT_FAILED
public static final ZegoRoomStateChangedReason LOGOUT_FAILED
Failed to log out of the room. Enter this state when calling [logoutRoom] fails to log out of the room or [switchRoom] fails to log out of the current room internally.
-
-
Method Detail
-
values
public static ZegoRoomStateChangedReason[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ZegoRoomStateChangedReason c : ZegoRoomStateChangedReason.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ZegoRoomStateChangedReason valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
value
public int value()
-
getZegoRoomStateChangedReason
public static ZegoRoomStateChangedReason getZegoRoomStateChangedReason(int value)
-
-