Class CommandNotificationMessage

  • All Implemented Interfaces:

    
    public class CommandNotificationMessage
    
                        

    命令提醒消息类

    命令消息类,此消息会进行存储,但不计入未读消息数。 与 CommandMessage 的区别是,此消息会进行存储并在界面上显示。

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      public String name
      public String data
      public final static Creator<CommandNotificationMessage> CREATOR
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      String getName() 获取命令名。
      void setName(String name) 设置命令名。
      String getData() 获取命令数据,可以为任意格式,如 JSON。
      void setData(String data) 设置命令数据,可以为任意格式,如 JSON。
      static CommandNotificationMessage obtain(String name, String data) 创建消息实例。
      Array<byte> encode()
      void writeToParcel(Parcel dest, int flags) 将类的数据写入外部提供的 Parcel 中。
      int describeContents() 描述了包含在 Parcelable 对象排列信息中的特殊对象的类型。
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CommandNotificationMessage

        CommandNotificationMessage(Array<byte> data)
      • CommandNotificationMessage

        CommandNotificationMessage(Parcel in)
    • Method Detail

      • getName

         String getName()

        获取命令名。

        Returns:

        命令名。

      • setName

         void setName(String name)

        设置命令名。

        Parameters:
        name - 命令名。
      • getData

         String getData()

        获取命令数据,可以为任意格式,如 JSON。

        Returns:

        命令数据,可以为任意格式,如 JSON。

      • setData

         void setData(String data)

        设置命令数据,可以为任意格式,如 JSON。

        Parameters:
        data - 命令数据,可以为任意格式,如 JSON。
      • obtain

         static CommandNotificationMessage obtain(String name, String data)

        创建消息实例。

        Parameters:
        name - 获取命令名。
        data - 设置命令数据,可以为任意格式,如 JSON。
        Returns:

        消息实例。

      • writeToParcel

         void writeToParcel(Parcel dest, int flags)

        将类的数据写入外部提供的 Parcel 中。

        Parameters:
        dest - 对象被写入的 Parcel。
        flags - 对象如何被写入的附加标志,可能是 0 或 PARCELABLE_WRITE_RETURN_VALUE。
      • describeContents

         int describeContents()

        描述了包含在 Parcelable 对象排列信息中的特殊对象的类型。

        Returns:

        一个标志位,表明 Parcelable 对象特殊对象类型集合的排列。