Package 

Class MqttMessageBean

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int protocol
      private JSONObject data
      private String dataId
      private boolean fromCloud
    • Constructor Summary

      Constructors 
      Constructor Description
      MqttMessageBean() Create MqttMessageBean instance
      MqttMessageBean(int protocol, String dataId, JSONObject data, boolean fromCloud) Create MqttMessageBean instance.
    • Method Summary

      Modifier and Type Method Description
      int getProtocol() Get MQTT protocol number.
      void setProtocol(int protocol) Set MQTT protocol number.
      JSONObject getData() Get device or server response message.
      void setData(JSONObject data) Set device or server response message.
      String getDataId() Get mqtt topic id.
      void setDataId(String dataId) Set mqtt topic id.
      void setFromCloud(boolean fromCloud) Set whether the message is from cloud.
      boolean isFromCloud() Get whether the message is from cloud
      • Methods inherited from class java.lang.Object

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

      • MqttMessageBean

        MqttMessageBean()
        Create MqttMessageBean instance
      • MqttMessageBean

        MqttMessageBean(int protocol, String dataId, JSONObject data, boolean fromCloud)
        Create MqttMessageBean instance.
        Parameters:
        protocol - Custom MQTT protocol number.
        dataId - Mqtt topic id, such as device id, uid and group id.
        data - Device or server response message.
        fromCloud - whether the message is from cloud
    • Method Detail

      • getProtocol

         int getProtocol()

        Get MQTT protocol number.

      • setProtocol

         void setProtocol(int protocol)

        Set MQTT protocol number.

        Parameters:
        protocol - MQTT protocol number.
      • getData

         JSONObject getData()

        Get device or server response message.

      • setData

         void setData(JSONObject data)

        Set device or server response message.

        Parameters:
        data - device or server response message.
      • getDataId

         String getDataId()

        Get mqtt topic id.

      • setDataId

         void setDataId(String dataId)

        Set mqtt topic id.

        Parameters:
        dataId - mqtt topic id.
      • setFromCloud

         void setFromCloud(boolean fromCloud)

        Set whether the message is from cloud.

        Parameters:
        fromCloud - is from cloud.
      • isFromCloud

         boolean isFromCloud()

        Get whether the message is from cloud