Interface IRtmEventHandler

The IRtmEventHandler class.

The SDK uses this class to send callback event notifications to the app, and the app inherits the methods in this class to retrieve these event notifications.

All methods in this class have their default (empty) implementations, and the app can inherit only some of the required events instead of all. In the callback methods, the app should avoid time-consuming tasks or calling blocking APIs, otherwise the SDK may not work properly.

Hierarchy

  • IRtmEventHandler

Methods

  • Occurs when user acquire a lock

    Parameters

    • requestId: number
    • channelName: string

      The name of the channel.

    • channelType: RTM_CHANNEL_TYPE

      The type of the channel.

    • lockName: string

      The name of the lock.

    • errorCode: RTM_ERROR_CODE

      The error code.

    • errorDetails: string

    Returns void

  • Occurs when the connection state changes between rtm sdk and agora service.

    Parameters

    Returns void

  • Occurs when user try to get the channel metadata

    Parameters

    • requestId: number

      The related request id when user perform this operation

    • channelName: string

      The name of the channel.

    • channelType: RTM_CHANNEL_TYPE

      The type of the channel.

    • data: RtmMetadata

      The result metadata of getting operation.

    • errorCode: RTM_ERROR_CODE

      The error code.

    Returns void

  • Occurs when user try to get locks from the channel

    Parameters

    • requestId: number
    • channelName: string

      The name of the channel.

    • channelType: RTM_CHANNEL_TYPE

      The type of the channel.

    • lockDetailList: LockDetail[]

      The details of the locks.

    • count: number

      The count of the locks.

    • errorCode: RTM_ERROR_CODE

      The error code.

    Returns void

  • Occurs when query who joined this channel

    Parameters

    • requestId: number

      The related request id when user perform this operation

    • userStateList: UserState[]
    • count: number

      The user count.

    • nextPage: string
    • errorCode: RTM_ERROR_CODE

      The error code.

    Returns void

  • Occurs when query which channels the user joined

    Parameters

    • requestId: number

      The related request id when user perform this operation

    • channels: ChannelInfo[]

      The channel informations.

    • count: number

      The channel count.

    • errorCode: RTM_ERROR_CODE

      The error code.

    Returns void

  • Occurs when user try to get the user metadata

    Parameters

    • requestId: number

      The related request id when user perform this operation

    • userId: string

      The id of the user.

    • data: RtmMetadata

      The result metadata of getting operation.

    • errorCode: RTM_ERROR_CODE

      The error code.

    Returns void

  • Occurs when user join a stream channel.

    Parameters

    • requestId: number
    • channelName: string

      The name of the channel.

    • userId: string

      The id of the user.

    • errorCode: RTM_ERROR_CODE

      The error code.

    Returns void

  • Occurs when user join topic.

    Parameters

    • requestId: number
    • channelName: string

      The name of the channel.

    • userId: string

      The id of the user.

    • topic: string

      The name of the topic.

    • meta: string

      The meta of the topic.

    • errorCode: RTM_ERROR_CODE

      The error code.

    Returns void

  • Occurs when user leave a stream channel.

    Parameters

    • requestId: number
    • channelName: string

      The name of the channel.

    • userId: string

      The id of the user.

    • errorCode: RTM_ERROR_CODE

      The error code.

    Returns void

  • Occurs when user leave topic.

    Parameters

    • requestId: number
    • channelName: string

      The name of the channel.

    • userId: string

      The id of the user.

    • topic: string

      The name of the topic.

    • meta: string

      The meta of the topic.

    • errorCode: RTM_ERROR_CODE

      The error code.

    Returns void

  • Occurs when remote user presence changed

    Parameters

    Returns void

  • Occurs when get user presence

    Parameters

    • requestId: number

      The related request id when user perform this operation

    • state: UserState
    • errorCode: RTM_ERROR_CODE

      The error code.

    Returns void

  • Occurs when delete user presence

    Parameters

    • requestId: number

      The related request id when user perform this operation

    • errorCode: RTM_ERROR_CODE

      The error code.

    Returns void

  • Occurs when set user presence

    Parameters

    • requestId: number

      The related request id when user perform this operation

    • errorCode: RTM_ERROR_CODE

      The error code.

    Returns void

  • Occurs when user publish message.

    Parameters

    • requestId: number

      The related request id when user publish message

    • errorCode: RTM_ERROR_CODE

      The error code.

    Returns void

  • Occurs when user release a lock

    Parameters

    • requestId: number
    • channelName: string

      The name of the channel.

    • channelType: RTM_CHANNEL_TYPE

      The type of the channel.

    • lockName: string

      The name of the lock.

    • errorCode: RTM_ERROR_CODE

      The error code.

    Returns void

  • Occurs when user removing the channel metadata

    Parameters

    • requestId: number

      The related request id when user perform this operation

    • channelName: string

      The name of the channel.

    • channelType: RTM_CHANNEL_TYPE

      The type of the channel.

    • errorCode: RTM_ERROR_CODE

      The error code.

    Returns void

  • Occurs when user delete a lock

    Parameters

    • requestId: number
    • channelName: string

      The name of the channel.

    • channelType: RTM_CHANNEL_TYPE

      The type of the channel.

    • lockName: string

      The name of the lock.

    • errorCode: RTM_ERROR_CODE

      The error code.

    Returns void

  • Occurs when user removing the user metadata

    Parameters

    • requestId: number

      The related request id when user perform this operation

    • userId: string

      The id of the user.

    • errorCode: RTM_ERROR_CODE

      The error code.

    Returns void

  • Occurs when user revoke a lock

    Parameters

    • requestId: number
    • channelName: string

      The name of the channel.

    • channelType: RTM_CHANNEL_TYPE

      The type of the channel.

    • lockName: string

      The name of the lock.

    • errorCode: RTM_ERROR_CODE

      The error code.

    Returns void

  • Occurs when user setting the channel metadata

    Parameters

    • requestId: number

      The related request id when user perform this operation

    • channelName: string

      The name of the channel.

    • channelType: RTM_CHANNEL_TYPE

      The type of the channel.

    • errorCode: RTM_ERROR_CODE

      The error code.

    Returns void

  • Occurs when user set a lock

    Parameters

    • requestId: number
    • channelName: string

      The name of the channel.

    • channelType: RTM_CHANNEL_TYPE

      The type of the channel.

    • lockName: string

      The name of the lock.

    • errorCode: RTM_ERROR_CODE

      The error code.

    Returns void

  • Occurs when user setting the user metadata

    Parameters

    • requestId: number

      The related request id when user perform this operation

    • userId: string

      The id of the user.

    • errorCode: RTM_ERROR_CODE

      The error code.

    Returns void

  • Occurs when subscribe a channel

    Parameters

    • requestId: number
    • channelName: string

      The name of the channel.

    • errorCode: RTM_ERROR_CODE

      The error code.

    Returns void

  • Occurs when user subscribe topic.

    Parameters

    • requestId: number
    • channelName: string

      The name of the channel.

    • userId: string

      The id of the user.

    • topic: string

      The name of the topic.

    • succeedUsers: UserList

      The subscribed users.

    • failedUsers: UserList
    • errorCode: RTM_ERROR_CODE

      The error code.

    Returns void

  • Occurs when user subscribe a user metadata

    Parameters

    • requestId: number
    • userId: string

      The id of the user.

    • errorCode: RTM_ERROR_CODE

      The error code.

    Returns void

  • Occurs when token will expire in 30 seconds.

    Parameters

    • channelName: string

      The name of the channel.

    Returns void

  • Occurs when remote user join/leave topic or when user first join this channel, got snapshot of topics in this channel

    Parameters

    Returns void

  • Occurs when user updating the channel metadata

    Parameters

    • requestId: number

      The related request id when user perform this operation

    • channelName: string

      The name of the channel.

    • channelType: RTM_CHANNEL_TYPE

      The type of the channel.

    • errorCode: RTM_ERROR_CODE

      The error code.

    Returns void

  • Occurs when user updating the user metadata

    Parameters

    • requestId: number

      The related request id when user perform this operation

    • userId: string

      The id of the user.

    • errorCode: RTM_ERROR_CODE

      The error code.

    Returns void

  • Occurs when query which channels the user joined

    Parameters

    • requestId: number

      The related request id when user perform this operation

    • channels: ChannelInfo[]

      The channel informations.

    • count: number

      The channel count.

    • errorCode: RTM_ERROR_CODE

      The error code.

    Returns void

  • Occurs when query who joined this channel

    Parameters

    • requestId: number

      The related request id when user perform this operation

    • userStateList: UserState[]
    • count: number

      The user count.

    • nextPage: string
    • errorCode: RTM_ERROR_CODE

      The error code.

    Returns void