Agora Java API Reference for Android

Public Member Functions | List of all members
io.agora.rtm.RtmStorage Class Referenceabstract

## Public Member Functions
abstract void | setChannelMetadata (String channelName, RtmChannelType channelType, Metadata data, MetadataOptions options, String lockName, ResultCallback< Void > resultCallback)
abstract void | updateChannelMetadata (String channelName, RtmChannelType channelType, Metadata data, MetadataOptions options, String lockName, ResultCallback< Void > resultCallback)
abstract void | removeChannelMetadata (String channelName, RtmChannelType channelType, Metadata data, MetadataOptions options, String lockName, ResultCallback< Void > resultCallback)
abstract void | getChannelMetadata (String channelName, RtmChannelType channelType, ResultCallback< Metadata > resultCallback)
abstract void | setUserMetadata (String userId, Metadata data, MetadataOptions options, ResultCallback< Void > resultCallback)
abstract void | updateUserMetadata (String userId, Metadata data, MetadataOptions options, ResultCallback< Void > resultCallback)
abstract void | removeUserMetadata (String userId, Metadata data, MetadataOptions options, ResultCallback< Void > resultCallback)
abstract void | getUserMetadata (String userId, ResultCallback< Metadata > resultCallback)
abstract void | subscribeUserMetadata (String userId, ResultCallback< Void > resultCallback)
abstract void | unsubscribeUserMetadata (String userId, ResultCallback< Void > resultCallback)

## Detailed Description

The RtmStorage class.

This class provides the rtm storage methods that can be invoked by your app.

## Member Function Documentation

## ◆ setChannelMetadata()

abstract void io.agora.rtm.RtmStorage.setChannelMetadata | ( | String | channelName,
|  | RtmChannelType | channelType,
|  | Metadata | data,
|  | MetadataOptions | options,
|  | String | lockName,
|  | ResultCallback< Void > | resultCallback
| ) |  |
| abstract

Set the metadata of a specified channel.

Parameters

  channelName | The name of the channel
  channelType | The type of the channel RtmChannelType
  data | Metadata data
  options | The options of operate metadata
  lockName | lock for operate channel metadata
  resultCallback | A ResultCallback object. Success: will receives the ResultCallback#onSuccess(Object) callback. Failure: will receives the ResultCallback#onFailure(ErrorInfo) callback.

## ◆ updateChannelMetadata()

abstract void io.agora.rtm.RtmStorage.updateChannelMetadata | ( | String | channelName,
|  | RtmChannelType | channelType,
|  | Metadata | data,
|  | MetadataOptions | options,
|  | String | lockName,
|  | ResultCallback< Void > | resultCallback
| ) |  |
| abstract

Update the metadata of a specified channel.

Parameters

  channelName | The name of the channel
  channelType | The type of the channel RtmChannelType
  data | Metadata data
  options | The options of operate metadata
  lockName | lock for operate channel metadata
  resultCallback | A ResultCallback object. Success: will receives the ResultCallback#onSuccess(Object) callback. Failure: will receives the ResultCallback#onFailure(ErrorInfo) callback.

## ◆ removeChannelMetadata()

abstract void io.agora.rtm.RtmStorage.removeChannelMetadata | ( | String | channelName,
|  | RtmChannelType | channelType,
|  | Metadata | data,
|  | MetadataOptions | options,
|  | String | lockName,
|  | ResultCallback< Void > | resultCallback
| ) |  |
| abstract

Remove the metadata of a specified channel.

Parameters

  channelName | The name of the channel
  channelType | The type of the channel RtmChannelType
  data | Metadata data
  options | The options of operate metadata
  lockName | lock for operate channel metadata
  resultCallback | A ResultCallback object. Success: will receives the ResultCallback#onSuccess(Object) callback. Failure: will receives the ResultCallback#onFailure(ErrorInfo) callback.

## ◆ getChannelMetadata()

abstract void io.agora.rtm.RtmStorage.getChannelMetadata | ( | String | channelName,
|  | RtmChannelType | channelType,
|  | ResultCallback< Metadata > | resultCallback
| ) |  |
| abstract

Get the metadata of a specified channel.

Parameters

  channelName | The name of the channel
  channelType | The type of the channel RtmChannelType
  resultCallback | A ResultCallback object Success: will receives the ResultCallback#onSuccess(Object) callback. Failure: will receives the ResultCallback#onFailure(ErrorInfo) callback.

## ◆ setUserMetadata()

abstract void io.agora.rtm.RtmStorage.setUserMetadata | ( | String | userId,
|  | Metadata | data,
|  | MetadataOptions | options,
|  | ResultCallback< Void > | resultCallback
| ) |  |
| abstract

Set the metadata of a specified user.

Parameters

  userId | The user ID of the specified user
  data | Metadata data
  options | The options of operate metadata
  resultCallback | A ResultCallback object. Success: will receives the ResultCallback#onSuccess(Object) callback. Failure: will receives the ResultCallback#onFailure(ErrorInfo) callback.

## ◆ updateUserMetadata()

abstract void io.agora.rtm.RtmStorage.updateUserMetadata | ( | String | userId,
|  | Metadata | data,
|  | MetadataOptions | options,
|  | ResultCallback< Void > | resultCallback
| ) |  |
| abstract

Update the metadata of a specified user.

Parameters

  userId | The user ID of the specified user
  data | Metadata data
  options | The options of operate metadata
  resultCallback | A ResultCallback object. Success: will receives the ResultCallback#onSuccess(Object) callback. Failure: will receives the ResultCallback#onFailure(ErrorInfo) callback.

## ◆ removeUserMetadata()

abstract void io.agora.rtm.RtmStorage.removeUserMetadata | ( | String | userId,
|  | Metadata | data,
|  | MetadataOptions | options,
|  | ResultCallback< Void > | resultCallback
| ) |  |
| abstract

Remove the metadata of a specified user.

Parameters

  userId | The user ID of the specified user
  data | Metadata data
  options | The options of operate metadata
  resultCallback | A ResultCallback object. Success: will receives the ResultCallback#onSuccess(Object) callback. Failure: will receives the ResultCallback#onFailure(ErrorInfo) callback.

## ◆ getUserMetadata()

abstract void io.agora.rtm.RtmStorage.getUserMetadata | ( | String | userId,
|  | ResultCallback< Metadata > | resultCallback
| ) |  |
| abstract

Get the metadata of a specified user.

Parameters

  userId | The user ID of the specified user.
  resultCallback | A ResultCallback object. Success: will receives the ResultCallback#onSuccess(Object) callback. Failure: will receives the ResultCallback#onFailure(ErrorInfo) callback.

## ◆ subscribeUserMetadata()

abstract void io.agora.rtm.RtmStorage.subscribeUserMetadata | ( | String | userId,
|  | ResultCallback< Void > | resultCallback
| ) |  |
| abstract

Subscribe the metadata update event of a specified user.

Parameters

  userId | The user ID of the specified user.
  resultCallback | A ResultCallback object. Success: will receives the ResultCallback#onSuccess(Object) callback. Failure: will receives the ResultCallback#onFailure(ErrorInfo) callback.

## ◆ unsubscribeUserMetadata()

abstract void io.agora.rtm.RtmStorage.unsubscribeUserMetadata | ( | String | userId,
|  | ResultCallback< Void > | resultCallback
| ) |  |
| abstract

unsubscribe the metadata update event of a specified user.

Parameters

  userId | The user ID of the specified user.
  resultCallback | A ResultCallback object. Success: will receives the ResultCallback#onSuccess(Object) callback. Failure: will receives the ResultCallback#onFailure(ErrorInfo) callback.