Chat SDK for Android v1.2.1
agora java chat SDK
Public Member Functions | List of all members
io.agora.chat.CmdMessageBody Class Reference
Inheritance diagram for io.agora.chat.CmdMessageBody:
io.agora.chat.MessageBody

Public Member Functions

 CmdMessageBody (String action)
 
String action ()
 
boolean isDeliverOnlineOnly ()
 
void deliverOnlineOnly (boolean onlineOnly)
 
String toString ()
 
- Public Member Functions inherited from io.agora.chat.MessageBody
long operationTime ()
 
String operatorId ()
 
int operationCount ()
 

Detailed Description

The command message body.

CmdMessageBody body = new CmdMessageBody("delete", null);
CmdMessageBody(String action)
Definition: CmdMessageBody.java:50

Constructor & Destructor Documentation

◆ CmdMessageBody()

io.agora.chat.CmdMessageBody.CmdMessageBody ( String  action)

Creates a command message.

Parameters
actionThe command action content.

Member Function Documentation

◆ action()

String io.agora.chat.CmdMessageBody.action ( )

Gets the command action content.

Returns
The command action content.

◆ deliverOnlineOnly()

void io.agora.chat.CmdMessageBody.deliverOnlineOnly ( boolean  onlineOnly)

Sets whether the current cmd msg is only delivered to online users.

Parameters
onlineOnlyWhether to deliver to online users only.
  • (Default)false: The message is delivered to all users.
  • true: The message is delivered to the online users only, so the offline users won't receive the message when they log in later.

◆ isDeliverOnlineOnly()

boolean io.agora.chat.CmdMessageBody.isDeliverOnlineOnly ( )

Checks whether this cmd message is only delivered to online users.

Returns
- true: Only delivers to online users.
  • false: Delivers to all users.

◆ toString()

String io.agora.chat.CmdMessageBody.toString ( )

Gets and displays the content of the CMD message.

Returns
The content of the action of the CMD message.

The documentation for this class was generated from the following file: