io.agora.rtc

## Enum Constants.UserOfflineReasonType

- java.lang.Object
- - java.lang.Enum<Constants.UserOfflineReasonType>
  - - io.agora.rtc.Constants.UserOfflineReasonType

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Constants.UserOfflineReasonType>
  Enclosing class:
    Constants

      public static enum Constants.UserOfflineReasonType
      extends java.lang.Enum<Constants.UserOfflineReasonType>

  Reasons for a user being offline.

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `USER_OFFLINE_BECOME_AUDIENCE` 2: The user switches the client role from the host to the audience.
    `USER_OFFLINE_DROPPED` 1: The SDK times out and the user drops offline because no data packet was received within a certain period of time.
    `USER_OFFLINE_QUIT` 0: The user leaves the current channel.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private int` | `value`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Constants.UserOfflineReasonType` | `fromInt(int value)` Converts an integer value to its corresponding UserOfflineReasonType enum constant.
    `int` | `getValue()` Gets the integer value of the user offline reason type.
    `static Constants.UserOfflineReasonType` | `valueOf(java.lang.String name)` Returns the enum constant of this type with the specified name.
    `static Constants.UserOfflineReasonType[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

    - ### Methods inherited from class java.lang.Enum

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### USER_OFFLINE_QUIT

          public static final Constants.UserOfflineReasonType USER_OFFLINE_QUIT

      0: The user leaves the current channel.

    - #### USER_OFFLINE_DROPPED

          public static final Constants.UserOfflineReasonType USER_OFFLINE_DROPPED

      1: The SDK times out and the user drops offline because no data packet was received within a certain period of time. If a user quits the call and the message is not passed to the SDK (due to an unreliable channel), the SDK assumes that the user drops offline.

    - #### USER_OFFLINE_BECOME_AUDIENCE

          public static final Constants.UserOfflineReasonType USER_OFFLINE_BECOME_AUDIENCE

      2: The user switches the client role from the host to the audience.

  - ### Field Detail

    - #### value

          private final int value

  - ### Method Detail

    - #### values

          public static Constants.UserOfflineReasonType[] 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 (Constants.UserOfflineReasonType c : Constants.UserOfflineReasonType.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static Constants.UserOfflineReasonType 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 name
        `java.lang.NullPointerException` - if the argument is null

    - #### getValue

          public int getValue()

      Gets the integer value of the user offline reason type.
      Returns:
        The integer value.

    - #### fromInt

          public static Constants.UserOfflineReasonType fromInt(int value)

      Converts an integer value to its corresponding UserOfflineReasonType enum constant.
      Parameters:
        `value` - The integer value.
      Returns:
        The corresponding UserOfflineReasonType, or null if the value is not found.