Class TopicRulePayload

    • Constructor Summary

      Constructors 
      Constructor Description
      TopicRulePayload()  
      TopicRulePayload​(TopicRulePayload source)
      NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy, and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      String getActions()
      Get 行为的JSON字符串,大部分种类举例如下: [ { "republish": { "topic": "TEST/test" } }, { "forward": { "api": "http://127.0.0.1:8080", "token":"xxx" } }, { "ckafka": { "instance": { "id": "ckafka-test", "name": "" }, "topic": { "id": "topic-test", "name": "test" }, "region": "gz" } }, { "cmqqueue": { "queuename": "queue-test-TEST", "region": "gz" } }, { "mysql": { "instanceid": "cdb-test", "region": "gz", "username": "test", "userpwd": "*****", "dbname": "d_mqtt", "tablename": "t_test", "fieldpairs": [ { "field": "test", "value": "test" } ], "devicetype": "CUSTOM" } } ]
      String getDescription()
      Get 规则描述
      Boolean getRuleDisabled()
      Get 是否禁用规则
      String getSql()
      Get 规则的SQL语句,如: SELECT * FROM 'pid/dname/event',然后对其进行base64编码,得:U0VMRUNUICogRlJPTSAncGlkL2RuYW1lL2V2ZW50Jw==
      void setActions​(String Actions)
      Set 行为的JSON字符串,大部分种类举例如下: [ { "republish": { "topic": "TEST/test" } }, { "forward": { "api": "http://127.0.0.1:8080", "token":"xxx" } }, { "ckafka": { "instance": { "id": "ckafka-test", "name": "" }, "topic": { "id": "topic-test", "name": "test" }, "region": "gz" } }, { "cmqqueue": { "queuename": "queue-test-TEST", "region": "gz" } }, { "mysql": { "instanceid": "cdb-test", "region": "gz", "username": "test", "userpwd": "*****", "dbname": "d_mqtt", "tablename": "t_test", "fieldpairs": [ { "field": "test", "value": "test" } ], "devicetype": "CUSTOM" } } ]
      void setDescription​(String Description)
      Set 规则描述
      void setRuleDisabled​(Boolean RuleDisabled)
      Set 是否禁用规则
      void setSql​(String Sql)
      Set 规则的SQL语句,如: SELECT * FROM 'pid/dname/event',然后对其进行base64编码,得:U0VMRUNUICogRlJPTSAncGlkL2RuYW1lL2V2ZW50Jw==
      void toMap​(HashMap<String,​String> map, String prefix)
      Internal implementation, normal users should not use it.
    • Constructor Detail

      • TopicRulePayload

        public TopicRulePayload()
      • TopicRulePayload

        public TopicRulePayload​(TopicRulePayload source)
        NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy, and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy.
    • Method Detail

      • getSql

        public String getSql()
        Get 规则的SQL语句,如: SELECT * FROM 'pid/dname/event',然后对其进行base64编码,得:U0VMRUNUICogRlJPTSAncGlkL2RuYW1lL2V2ZW50Jw==
        Returns:
        Sql 规则的SQL语句,如: SELECT * FROM 'pid/dname/event',然后对其进行base64编码,得:U0VMRUNUICogRlJPTSAncGlkL2RuYW1lL2V2ZW50Jw==
      • setSql

        public void setSql​(String Sql)
        Set 规则的SQL语句,如: SELECT * FROM 'pid/dname/event',然后对其进行base64编码,得:U0VMRUNUICogRlJPTSAncGlkL2RuYW1lL2V2ZW50Jw==
        Parameters:
        Sql - 规则的SQL语句,如: SELECT * FROM 'pid/dname/event',然后对其进行base64编码,得:U0VMRUNUICogRlJPTSAncGlkL2RuYW1lL2V2ZW50Jw==
      • getActions

        public String getActions()
        Get 行为的JSON字符串,大部分种类举例如下: [ { "republish": { "topic": "TEST/test" } }, { "forward": { "api": "http://127.0.0.1:8080", "token":"xxx" } }, { "ckafka": { "instance": { "id": "ckafka-test", "name": "" }, "topic": { "id": "topic-test", "name": "test" }, "region": "gz" } }, { "cmqqueue": { "queuename": "queue-test-TEST", "region": "gz" } }, { "mysql": { "instanceid": "cdb-test", "region": "gz", "username": "test", "userpwd": "*****", "dbname": "d_mqtt", "tablename": "t_test", "fieldpairs": [ { "field": "test", "value": "test" } ], "devicetype": "CUSTOM" } } ]
        Returns:
        Actions 行为的JSON字符串,大部分种类举例如下: [ { "republish": { "topic": "TEST/test" } }, { "forward": { "api": "http://127.0.0.1:8080", "token":"xxx" } }, { "ckafka": { "instance": { "id": "ckafka-test", "name": "" }, "topic": { "id": "topic-test", "name": "test" }, "region": "gz" } }, { "cmqqueue": { "queuename": "queue-test-TEST", "region": "gz" } }, { "mysql": { "instanceid": "cdb-test", "region": "gz", "username": "test", "userpwd": "*****", "dbname": "d_mqtt", "tablename": "t_test", "fieldpairs": [ { "field": "test", "value": "test" } ], "devicetype": "CUSTOM" } } ]
      • setActions

        public void setActions​(String Actions)
        Set 行为的JSON字符串,大部分种类举例如下: [ { "republish": { "topic": "TEST/test" } }, { "forward": { "api": "http://127.0.0.1:8080", "token":"xxx" } }, { "ckafka": { "instance": { "id": "ckafka-test", "name": "" }, "topic": { "id": "topic-test", "name": "test" }, "region": "gz" } }, { "cmqqueue": { "queuename": "queue-test-TEST", "region": "gz" } }, { "mysql": { "instanceid": "cdb-test", "region": "gz", "username": "test", "userpwd": "*****", "dbname": "d_mqtt", "tablename": "t_test", "fieldpairs": [ { "field": "test", "value": "test" } ], "devicetype": "CUSTOM" } } ]
        Parameters:
        Actions - 行为的JSON字符串,大部分种类举例如下: [ { "republish": { "topic": "TEST/test" } }, { "forward": { "api": "http://127.0.0.1:8080", "token":"xxx" } }, { "ckafka": { "instance": { "id": "ckafka-test", "name": "" }, "topic": { "id": "topic-test", "name": "test" }, "region": "gz" } }, { "cmqqueue": { "queuename": "queue-test-TEST", "region": "gz" } }, { "mysql": { "instanceid": "cdb-test", "region": "gz", "username": "test", "userpwd": "*****", "dbname": "d_mqtt", "tablename": "t_test", "fieldpairs": [ { "field": "test", "value": "test" } ], "devicetype": "CUSTOM" } } ]
      • getDescription

        public String getDescription()
        Get 规则描述
        Returns:
        Description 规则描述
      • setDescription

        public void setDescription​(String Description)
        Set 规则描述
        Parameters:
        Description - 规则描述
      • getRuleDisabled

        public Boolean getRuleDisabled()
        Get 是否禁用规则
        Returns:
        RuleDisabled 是否禁用规则
      • setRuleDisabled

        public void setRuleDisabled​(Boolean RuleDisabled)
        Set 是否禁用规则
        Parameters:
        RuleDisabled - 是否禁用规则