Class CommandMessage
-
- All Implemented Interfaces:
public class CommandMessage
Command Message Class
Command message class. This type of message is neither stored nor counted in the unread message count. The difference between this and CommandNotificationMessage is that this message is not stored and will not be displayed in the UI.
-
-
Constructor Summary
Constructors Constructor Description CommandMessage(Array<byte> data)
CommandMessage(Parcel in)
-
Method Summary
Modifier and Type Method Description String
getName()
Retrieves the command name. void
setName(String name)
Sets the command name. String
getData()
Retrieves command data, which can be in any format, such as JSON. void
setData(String data)
Sets the command data, which can be in any format, such as JSON. static CommandMessage
obtain(String name, String data)
Creates a message instance. Array<byte>
encode()
void
writeToParcel(Parcel dest, int flags)
Writes the class's data into the provided Parcel. int
describeContents()
Describes the type of special objects included in the Parcelable object's arrangement information. -
-
Constructor Detail
-
CommandMessage
CommandMessage(Array<byte> data)
-
CommandMessage
CommandMessage(Parcel in)
-
-
Method Detail
-
getName
String getName()
Retrieves the command name.
- Returns:
The command name.
-
setName
void setName(String name)
Sets the command name.
- Parameters:
name
- The command name.
-
getData
String getData()
Retrieves command data, which can be in any format, such as JSON.
- Returns:
Command data, which can be in any format, such as JSON.
-
setData
void setData(String data)
Sets the command data, which can be in any format, such as JSON.
- Parameters:
data
- The command data, which can be in any format, such as JSON.
-
obtain
static CommandMessage obtain(String name, String data)
Creates a message instance.
- Parameters:
name
- Specifies the command name.data
- Sets the command data, which can be in any format, such as JSON.- Returns:
The message instance.
-
writeToParcel
void writeToParcel(Parcel dest, int flags)
Writes the class's data into the provided Parcel.
- Parameters:
dest
- The Parcel into which the object is written.flags
- Additional flags about how the object should be written, which may be 0 or PARCELABLE_WRITE_RETURN_VALUE.
-
describeContents
int describeContents()
Describes the type of special objects included in the Parcelable object's arrangement information.
- Returns:
A flag indicating the arrangement of the Parcelable object's special object type collection.
-
-
-
-