Package io.agora.rtm
Class RtmStorage
java.lang.Object
io.agora.rtm.RtmStorage
The RtmStorage class.
This class provides the rtm storage methods that can be invoked by your app.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidgetChannelMetadata(String channelName, RtmConstants.RtmChannelType channelType, ResultCallback<Metadata> resultCallback) Get the metadata of a specified channel.abstract voidgetUserMetadata(String userId, ResultCallback<Metadata> resultCallback) Get the metadata of a specified user.abstract voidremoveChannelMetadata(String channelName, RtmConstants.RtmChannelType channelType, Metadata data, MetadataOptions options, String lockName, ResultCallback<Void> resultCallback) Remove the metadata of a specified channel.abstract voidremoveUserMetadata(String userId, Metadata data, MetadataOptions options, ResultCallback<Void> resultCallback) Remove the metadata of a specified user.abstract voidsetChannelMetadata(String channelName, RtmConstants.RtmChannelType channelType, Metadata data, MetadataOptions options, String lockName, ResultCallback<Void> resultCallback) Set the metadata of a specified channel.abstract voidsetUserMetadata(String userId, Metadata data, MetadataOptions options, ResultCallback<Void> resultCallback) Set the metadata of a specified user.abstract voidsubscribeUserMetadata(String userId, ResultCallback<Void> resultCallback) Subscribe the metadata update event of a specified user.abstract voidunsubscribeUserMetadata(String userId, ResultCallback<Void> resultCallback) unsubscribe the metadata update event of a specified user.abstract voidupdateChannelMetadata(String channelName, RtmConstants.RtmChannelType channelType, Metadata data, MetadataOptions options, String lockName, ResultCallback<Void> resultCallback) Update the metadata of a specified channel.abstract voidupdateUserMetadata(String userId, Metadata data, MetadataOptions options, ResultCallback<Void> resultCallback) Update the metadata of a specified user.
-
Constructor Details
-
RtmStorage
public RtmStorage()
-
-
Method Details
-
setChannelMetadata
public abstract void setChannelMetadata(String channelName, RtmConstants.RtmChannelType channelType, Metadata data, MetadataOptions options, String lockName, ResultCallback<Void> resultCallback) Set the metadata of a specified channel.- Parameters:
channelName- The name of the channelchannelType- The type of the channelRtmConstants.RtmChannelTypedata- Metadata dataoptions- The options of operate metadatalockName- lock for operate channel metadataresultCallback- AResultCallbackobject. - Success: will receives theResultCallback.onSuccess(Object)callback. - Failure: will receives theResultCallback.onFailure(ErrorInfo)callback.
-
updateChannelMetadata
public abstract void updateChannelMetadata(String channelName, RtmConstants.RtmChannelType channelType, Metadata data, MetadataOptions options, String lockName, ResultCallback<Void> resultCallback) Update the metadata of a specified channel.- Parameters:
channelName- The name of the channelchannelType- The type of the channelRtmConstants.RtmChannelTypedata- Metadata dataoptions- The options of operate metadatalockName- lock for operate channel metadataresultCallback- AResultCallbackobject. - Success: will receives theResultCallback.onSuccess(Object)callback. - Failure: will receives theResultCallback.onFailure(ErrorInfo)callback.
-
removeChannelMetadata
public abstract void removeChannelMetadata(String channelName, RtmConstants.RtmChannelType channelType, Metadata data, MetadataOptions options, String lockName, ResultCallback<Void> resultCallback) Remove the metadata of a specified channel.- Parameters:
channelName- The name of the channelchannelType- The type of the channelRtmConstants.RtmChannelTypedata- Metadata dataoptions- The options of operate metadatalockName- lock for operate channel metadataresultCallback- AResultCallbackobject. - Success: will receives theResultCallback.onSuccess(Object)callback. - Failure: will receives theResultCallback.onFailure(ErrorInfo)callback.
-
getChannelMetadata
public abstract void getChannelMetadata(String channelName, RtmConstants.RtmChannelType channelType, ResultCallback<Metadata> resultCallback) Get the metadata of a specified channel.- Parameters:
channelName- The name of the channelchannelType- The type of the channelRtmConstants.RtmChannelTyperesultCallback- AResultCallbackobject - Success: will receives theResultCallback.onSuccess(Object)callback. - Failure: will receives theResultCallback.onFailure(ErrorInfo)callback.
-
setUserMetadata
public abstract void setUserMetadata(String userId, Metadata data, MetadataOptions options, ResultCallback<Void> resultCallback) Set the metadata of a specified user.- Parameters:
userId- The user ID of the specified userdata- Metadata dataoptions- The options of operate metadataresultCallback- AResultCallbackobject. - Success: will receives theResultCallback.onSuccess(Object)callback. - Failure: will receives theResultCallback.onFailure(ErrorInfo)callback.
-
updateUserMetadata
public abstract void updateUserMetadata(String userId, Metadata data, MetadataOptions options, ResultCallback<Void> resultCallback) Update the metadata of a specified user.- Parameters:
userId- The user ID of the specified userdata- Metadata dataoptions- The options of operate metadataresultCallback- AResultCallbackobject. - Success: will receives theResultCallback.onSuccess(Object)callback. - Failure: will receives theResultCallback.onFailure(ErrorInfo)callback.
-
removeUserMetadata
public abstract void removeUserMetadata(String userId, Metadata data, MetadataOptions options, ResultCallback<Void> resultCallback) Remove the metadata of a specified user.- Parameters:
userId- The user ID of the specified userdata- Metadata dataoptions- The options of operate metadataresultCallback- AResultCallbackobject. - Success: will receives theResultCallback.onSuccess(Object)callback. - Failure: will receives theResultCallback.onFailure(ErrorInfo)callback.
-
getUserMetadata
Get the metadata of a specified user.- Parameters:
userId- The user ID of the specified user.resultCallback- AResultCallbackobject. - Success: will receives theResultCallback.onSuccess(Object)callback. - Failure: will receives theResultCallback.onFailure(ErrorInfo)callback.
-
subscribeUserMetadata
Subscribe the metadata update event of a specified user.- Parameters:
userId- The user ID of the specified user.resultCallback- AResultCallbackobject. - Success: will receives theResultCallback.onSuccess(Object)callback. - Failure: will receives theResultCallback.onFailure(ErrorInfo)callback.
-
unsubscribeUserMetadata
unsubscribe the metadata update event of a specified user.- Parameters:
userId- The user ID of the specified user.resultCallback- AResultCallbackobject. - Success: will receives theResultCallback.onSuccess(Object)callback. - Failure: will receives theResultCallback.onFailure(ErrorInfo)callback.
-