All Downloads are FREE. Search and download functionalities are using the official Maven repository.

xworker.org.eclipse.paho.client.mqttv3.MQTTClient.dml Maven / Gradle / Ivy

%1571365931241
@
sname=MQTTClient
slabel=MQTTClient
sdescriptors=xworker.lang.MetaDescriptor3
smany=true
seditCols=2
sinitialization=false
sgroup=net.protocols.mqtt.paho
smodifier=public
sinheritDescription=false
Sdescription=
#$@text#$@

Eclispe的MQTT客户端,也是动作,执行后返回MqttClient对象。

保存范围

    MQTTClient可以是JVM全局的,也可以是当前变量上下文全局的。

变量上下文

    创建MQTTClient时会把当前变量上下文保存,以后收到事件时都会使用这个变量上下文。

事件

  • void connectionLost(MqttClient client)
    连接断开的事件。
  • void messageArrived(MqttClient client, String topic, MqttMessage message)    
    收到消息。
  • void deliveryComplete(MqttClient client, IMqttDeliveryToken token)
    消息发送成功。

监听器

    可以调用MQTTClientListener addListener(Object listener)方添加额外的监听器,listener支持Thing或ActionContainer。可以通过removeListener(MQTTClientListener  listener)移除事件监听器。

可以重写的方法:

  • String getHost()
     
  • String getClientId()
     
  • String getUserName()
      
  • String getPassword()
      
  • String getTopics()  

     

 

#$@text#$@ snotXmlAttribute=false sjson_isArray=false sth_createIndex=false sth_registMyChilds=false sth_registDisabled=false sth_thingRegistViewer=xworker.org.eclipse.paho.client.mqttv3.MQTTClientViewer sth_fileMonitor=false sth_mark=false @/@actions sname=actions sdescriptors=xworker.lang.MetaDescriptor3/@actions sinheritDescription=false sth_createIndex=false sth_registMyChilds=false sth_registDisabled=false sth_fileMonitor=false sth_mark=false sid=actions @/@actions/@run sname=run sisSynchronized=false sthrowException=true suseOtherAction=false suseOuterJava=true suseInnerJava=false souterClassName=xworker.org.eclipse.paho.mqttv3.MqttActions smethodName=run sdisableGlobalContext=false sattributeTemplate=false sinterpretationType=Action svarScope=Global screateLocalVarScope=false ssaveReturn=false sdebugLog=false sdescriptors=xworker.lang.actions.Actions/@JavaAction sinheritDescription=false sth_createIndex=false sth_registMyChilds=false sth_registDisabled=false sth_fileMonitor=false sth_mark=false sid=run @/@actions/@getHost sname=getHost sattributeName=host snotNull=false sinterpretationType=Self sattributeTemplate=false schildsAttributeTemplate=false svarScope=Local sisSynchronized=false sthrowException=true suseOtherAction=false screateLocalVarScope=false ssaveReturn=false sdisableGlobalContext=false sdebugLog=false sdescriptors=xworker.lang.actions.ActionUtil/@GetString sinheritDescription=false sth_createIndex=false sth_registMyChilds=false sth_registDisabled=false sth_fileMonitor=false sth_mark=false sid=getHost @/@actions/@getClientId sname=getClientId sattributeName=clientId snotNull=false sinterpretationType=Self sattributeTemplate=false schildsAttributeTemplate=false svarScope=Local sisSynchronized=false sthrowException=true suseOtherAction=false screateLocalVarScope=false ssaveReturn=false sdisableGlobalContext=false sdebugLog=false sdescriptors=xworker.lang.actions.ActionUtil/@GetString sinheritDescription=false sth_createIndex=false sth_registMyChilds=false sth_registDisabled=false sth_fileMonitor=false sth_mark=false sid=getClientId @/@actions/@getUserName sname=getUserName sattributeName=userName snotNull=false sinterpretationType=Self sattributeTemplate=false schildsAttributeTemplate=false svarScope=Local sisSynchronized=false sthrowException=true suseOtherAction=false screateLocalVarScope=false ssaveReturn=false sdisableGlobalContext=false sdebugLog=false sdescriptors=xworker.lang.actions.ActionUtil/@GetString sinheritDescription=false sth_createIndex=false sth_registMyChilds=false sth_registDisabled=false sth_fileMonitor=false sth_mark=false sid=getUserName @/@actions/@getPassword sname=getPassword sattributeName=password snotNull=false sinterpretationType=Self sattributeTemplate=false schildsAttributeTemplate=false svarScope=Local sisSynchronized=false sthrowException=true suseOtherAction=false screateLocalVarScope=false ssaveReturn=false sdisableGlobalContext=false sdebugLog=false sdescriptors=xworker.lang.actions.ActionUtil/@GetString sinheritDescription=false sth_createIndex=false sth_registMyChilds=false sth_registDisabled=false sth_fileMonitor=false sth_mark=false sid=getPassword @/@actions/@getTopics sname=getTopics sattributeName=topics snotNull=false sinterpretationType=Self sattributeTemplate=false schildsAttributeTemplate=false svarScope=Local sisSynchronized=false sthrowException=true suseOtherAction=false screateLocalVarScope=false ssaveReturn=false sdisableGlobalContext=false sdebugLog=false sdescriptors=xworker.lang.actions.ActionUtil/@GetString sinheritDescription=false sth_createIndex=false sth_registMyChilds=false sth_registDisabled=false sth_fileMonitor=false sth_mark=false sid=getTopics @/@actions/@close sname=close sisSynchronized=false sthrowException=true suseOtherAction=false suseOuterJava=true suseInnerJava=false souterClassName=xworker.org.eclipse.paho.mqttv3.MqttActions smethodName=close sdisableGlobalContext=false sattributeTemplate=false sinterpretationType=Action svarScope=Global screateLocalVarScope=false ssaveReturn=false sdebugLog=false sdescriptors=xworker.lang.actions.Actions/@JavaAction sinheritDescription=false sth_createIndex=false sth_registMyChilds=false sth_registDisabled=false sth_fileMonitor=false sth_mark=false sid=close @/@actions/@disconnect sname=disconnect sisSynchronized=false sthrowException=true suseOtherAction=false suseOuterJava=true suseInnerJava=false souterClassName=xworker.org.eclipse.paho.mqttv3.MqttActions smethodName=disconnect sdisableGlobalContext=false sattributeTemplate=false sinterpretationType=Action svarScope=Global screateLocalVarScope=false ssaveReturn=false sdebugLog=false sdescriptors=xworker.lang.actions.Actions/@JavaAction sinheritDescription=false sth_createIndex=false sth_registMyChilds=false sth_registDisabled=false sth_fileMonitor=false sth_mark=false sid=disconnect @/@actions/@connectionLost sname=connectionLost sunimplementedException=false sdescriptors=xworker.lang.actions.Actions/@NOOP sinterpretationType=Self sattributeTemplate=false schildsAttributeTemplate=false svarScope=Local sisSynchronized=false sthrowException=true suseOtherAction=false screateLocalVarScope=false ssaveReturn=false sdisableGlobalContext=false sdebugLog=false sinheritDescription=false sth_createIndex=false sth_registMyChilds=false sth_registDisabled=false sth_fileMonitor=false sth_mark=false sid=connectionLost @/@actions/@messageArrived sname=messageArrived sunimplementedException=false sdescriptors=xworker.lang.actions.Actions/@NOOP sinterpretationType=Self sattributeTemplate=false schildsAttributeTemplate=false svarScope=Local sisSynchronized=false sthrowException=true suseOtherAction=false screateLocalVarScope=false ssaveReturn=false sdisableGlobalContext=false sdebugLog=false sinheritDescription=false sth_createIndex=false sth_registMyChilds=false sth_registDisabled=false sth_fileMonitor=false sth_mark=false sid=messageArrived @/@actions/@messageArrived/@ins sisValidate=false sname=ins sdescriptors=xworker.lang.actions.Inout/@ins sinheritDescription=false sth_createIndex=false sth_registMyChilds=false sth_registDisabled=false sth_fileMonitor=false sth_mark=false sid=ins @/@actions/@messageArrived/@ins/@message sname=message stype=org.eclipse.paho.client.mqttv3.MqttMessage stypeCheck=false soptional=true scheck=false scheckLevel=exception sdescriptors=xworker.lang.actions.Inout/@ins/@param sinheritDescription=false sth_createIndex=false sth_registMyChilds=false sth_registDisabled=false sth_fileMonitor=false sth_mark=false sid=message @/@actions/@messageArrived/@ins/@topic sname=topic stype=java.lang.String stypeCheck=false soptional=true scheck=false scheckLevel=exception sdescriptors=xworker.lang.actions.Inout/@ins/@param sinheritDescription=false sth_createIndex=false sth_registMyChilds=false sth_registDisabled=false sth_fileMonitor=false sth_mark=false sid=topic @/@actions/@messageArrived/@ins/@client sname=client stype=org.eclipse.paho.client.mqttv3.IMqttClient stypeCheck=false soptional=true scheck=false scheckLevel=exception sdescriptors=xworker.lang.actions.Inout/@ins/@param sinheritDescription=false sth_createIndex=false sth_registMyChilds=false sth_registDisabled=false sth_fileMonitor=false sth_mark=false sid=client @/@actions/@deliveryComplete sname=deliveryComplete sunimplementedException=false sdescriptors=xworker.lang.actions.Actions/@NOOP sinterpretationType=Self sattributeTemplate=false schildsAttributeTemplate=false svarScope=Local sisSynchronized=false sthrowException=true suseOtherAction=false screateLocalVarScope=false ssaveReturn=false sdisableGlobalContext=false sdebugLog=false sinheritDescription=false sth_createIndex=false sth_registMyChilds=false sth_registDisabled=false sth_fileMonitor=false sth_mark=false sid=deliveryComplete @/@actions/@getClient sname=getClient sisSynchronized=false sthrowException=true suseOtherAction=false suseOuterJava=true suseInnerJava=false souterClassName=xworker.org.eclipse.paho.mqttv3.MqttActions smethodName=getClient sdisableGlobalContext=false sattributeTemplate=false sinterpretationType=Action svarScope=Global screateLocalVarScope=false ssaveReturn=false sdebugLog=false sdescriptors=xworker.lang.actions.Actions/@JavaAction sinheritDescription=false sth_createIndex=false sth_registMyChilds=false sth_registDisabled=false sth_fileMonitor=false sth_mark=false sid=getClient @/@actions/@addListener sname=addListener sisSynchronized=false sthrowException=true suseOtherAction=false suseOuterJava=true suseInnerJava=false souterClassName=xworker.org.eclipse.paho.mqttv3.MqttActions smethodName=addListener sdisableGlobalContext=false sattributeTemplate=false sinterpretationType=Action svarScope=Global screateLocalVarScope=false ssaveReturn=false sdebugLog=false sdescriptors=xworker.lang.actions.Actions/@JavaAction sinheritDescription=false sth_createIndex=false sth_registMyChilds=false sth_registDisabled=false sth_fileMonitor=false sth_mark=false sid=addListener @/@actions/@addListener/@ins sisValidate=false sname=ins sdescriptors=xworker.lang.actions.Inout/@ins sinheritDescription=false sth_createIndex=false sth_registMyChilds=false sth_registDisabled=false sth_fileMonitor=false sth_mark=false sid=ins @/@actions/@addListener/@ins/@listener sname=listener stype=Object stypeCheck=false soptional=true scheck=false scheckLevel=exception sdescription=

可以是Thing和ActionContainer等。

sdescriptors=xworker.lang.actions.Inout/@ins/@param sinheritDescription=false sth_createIndex=false sth_registMyChilds=false sth_registDisabled=false sth_fileMonitor=false sth_mark=false sid=listener @/@actions/@removeListener sname=removeListener sisSynchronized=false sthrowException=true suseOtherAction=false suseOuterJava=true suseInnerJava=false souterClassName=xworker.org.eclipse.paho.mqttv3.MqttActions smethodName=removeListener sdisableGlobalContext=false sattributeTemplate=false sinterpretationType=Action svarScope=Global screateLocalVarScope=false ssaveReturn=false sdebugLog=false sdescriptors=xworker.lang.actions.Actions/@JavaAction sinheritDescription=false sth_createIndex=false sth_registMyChilds=false sth_registDisabled=false sth_fileMonitor=false sth_mark=false sid=removeListener @/@actions/@removeListener/@ins sisValidate=false sname=ins sdescriptors=xworker.lang.actions.Inout/@ins sinheritDescription=false sth_createIndex=false sth_registMyChilds=false sth_registDisabled=false sth_fileMonitor=false sth_mark=false sid=ins @/@actions/@removeListener/@ins/@listener sname=listener stype=Object stypeCheck=false soptional=true scheck=false scheckLevel=exception sdescription=

可以是Thing和ActionContainer等。

sdescriptors=xworker.lang.actions.Inout/@ins/@param sinheritDescription=false sth_createIndex=false sth_registMyChilds=false sth_registDisabled=false sth_fileMonitor=false sth_mark=false sid=listener @/@actions/@isConnect sname=isConnected sisSynchronized=false sthrowException=true suseOtherAction=false suseOuterJava=true suseInnerJava=false souterClassName=xworker.org.eclipse.paho.mqttv3.MqttActions smethodName=isConnected sdisableGlobalContext=false sattributeTemplate=false sinterpretationType=Action svarScope=Global screateLocalVarScope=false ssaveReturn=false sdebugLog=false sdescriptors=xworker.lang.actions.Actions/@JavaAction sinheritDescription=false sth_createIndex=false sth_registMyChilds=false sth_registDisabled=false sth_fileMonitor=false sth_mark=false sid=isConnect @/@actions/@getTopicList sname=getTopicList sattributeName=topics snotNull=false ssplitLine=true sdelimiter=, sinterpretationType=Self sattributeTemplate=false schildsAttributeTemplate=false svarScope=Local sisSynchronized=false sthrowException=true suseOtherAction=false screateLocalVarScope=false ssaveReturn=false sdisableGlobalContext=false sdebugLog=false sdescriptors=xworker.lang.actions.ActionUtil/@GetStringList sinheritDescription=false sth_createIndex=false sth_registMyChilds=false sth_registDisabled=false sth_fileMonitor=false sth_mark=false sid=getTopicList @/@actions/@getSendTopicList sname=getSendTopicList sattributeName=sendTopics snotNull=false ssplitLine=true sdelimiter=, sinterpretationType=Self sattributeTemplate=false schildsAttributeTemplate=false svarScope=Local sisSynchronized=false sthrowException=true suseOtherAction=false screateLocalVarScope=false ssaveReturn=false sdisableGlobalContext=false sdebugLog=false sdescriptors=xworker.lang.actions.ActionUtil/@GetStringList sinheritDescription=false sth_createIndex=false sth_registMyChilds=false sth_registDisabled=false sth_fileMonitor=false sth_mark=false sid=getSendTopicList @/@name sname=name sshowLabel=true slabelAlign=right slabelVAlign=baseline smodifier=public sreadOnly=false sinheritDescription=false svalidateAllowBlank=true LvalidateOnBlur=true LallowDecimals=true LallowNegative=true snotXmlAttribute=false sdescriptors=xworker.lang.MetaDescriptor3/@attribute sth_createIndex=false sth_registMyChilds=false sth_registDisabled=false sth_fileMonitor=false sth_mark=false sid=name @/@label sname=label sshowLabel=true slabelAlign=right slabelVAlign=baseline smodifier=public sreadOnly=false sinheritDescription=false svalidateAllowBlank=true LvalidateOnBlur=true LallowDecimals=true LallowNegative=true snotXmlAttribute=false sdescriptors=xworker.lang.MetaDescriptor3/@attribute sth_createIndex=false sth_registMyChilds=false sth_registDisabled=false sth_fileMonitor=false sth_mark=false sid=label @/@scope sname=scope sinputtype=select sshowLabel=true slabelAlign=right slabelVAlign=baseline smodifier=public sreadOnly=false sdefault=static sinheritDescription=false Sdescription= #$@text#$@

MQTTClient的保存法范围

  • static
    全局静态。只有一个实例。
     
  • global
    保存到变量上下文中的全局变量中,不同的变量上下文有不同的实例。此时使用MQTTClient的name作为变量名保存。

 

#$@text#$@ svalidateAllowBlank=true LvalidateOnBlur=true LallowDecimals=true LallowNegative=true snotXmlAttribute=false sdescriptors=xworker.lang.MetaDescriptor3/@attribute sth_createIndex=false sth_registMyChilds=false sth_registDisabled=false sth_fileMonitor=false sth_mark=false sid=scope @/@scope/@world sname=static svalue=static sdescriptors=xworker.lang.MetaDescriptor3/@attribute/@value sinheritDescription=false sth_createIndex=false sth_registMyChilds=false sth_registDisabled=false sth_fileMonitor=false sth_mark=false sid=world @/@scope/@global sname=global svalue=global sdescriptors=xworker.lang.MetaDescriptor3/@attribute/@value sinheritDescription=false sth_createIndex=false sth_registMyChilds=false sth_registDisabled=false sth_fileMonitor=false sth_mark=false sid=global @/@host sname=host ssize=50 sshowLabel=true slabelAlign=right slabelVAlign=baseline smodifier=public sreadOnly=false sinheritDescription=false svalidateAllowBlank=true LvalidateOnBlur=true LallowDecimals=true LallowNegative=true snotXmlAttribute=false sdescriptors=xworker.lang.MetaDescriptor3/@attribute sth_createIndex=false sth_registMyChilds=false sth_registDisabled=false sth_fileMonitor=false sth_mark=false sid=host @/@clientId sname=clientId ssize=50 sshowLabel=true slabelAlign=right slabelVAlign=baseline smodifier=public sreadOnly=false sinheritDescription=false svalidateAllowBlank=true LvalidateOnBlur=true LallowDecimals=true LallowNegative=true snotXmlAttribute=false sdescriptors=xworker.lang.MetaDescriptor3/@attribute sth_createIndex=false sth_registMyChilds=false sth_registDisabled=false sth_fileMonitor=false sth_mark=false sid=clientId @/@userName sname=userName sshowLabel=true slabelAlign=right slabelVAlign=baseline smodifier=public sreadOnly=false sinheritDescription=false svalidateAllowBlank=true LvalidateOnBlur=true LallowDecimals=true LallowNegative=true snotXmlAttribute=false sdescriptors=xworker.lang.MetaDescriptor3/@attribute sth_createIndex=false sth_registMyChilds=false sth_registDisabled=false sth_fileMonitor=false sth_mark=false sid=userName @/@password sname=password sshowLabel=true slabelAlign=right slabelVAlign=baseline smodifier=public sreadOnly=false sinheritDescription=false svalidateAllowBlank=true LvalidateOnBlur=true LallowDecimals=true LallowNegative=true snotXmlAttribute=false sdescriptors=xworker.lang.MetaDescriptor3/@attribute sth_createIndex=false sth_registMyChilds=false sth_registDisabled=false sth_fileMonitor=false sth_mark=false sid=password @/@automaticReconnect sname=automaticReconnect sinputtype=truefalse sshowLabel=true slabelAlign=right slabelVAlign=baseline smodifier=public sreadOnly=false sdefault=true sinheritDescription=false svalidateAllowBlank=true LvalidateOnBlur=true LallowDecimals=true LallowNegative=true snotXmlAttribute=false sdescriptors=xworker.lang.MetaDescriptor3/@attribute sth_createIndex=false sth_registMyChilds=false sth_registDisabled=false sth_fileMonitor=false sth_mark=false sid=automaticReconnect @/@cleanSession sname=cleanSession sinputtype=truefalse sshowLabel=true slabelAlign=right slabelVAlign=baseline smodifier=public sreadOnly=false sdefault=false sinheritDescription=false svalidateAllowBlank=true LvalidateOnBlur=true LallowDecimals=true LallowNegative=true snotXmlAttribute=false sdescriptors=xworker.lang.MetaDescriptor3/@attribute sth_createIndex=false sth_registMyChilds=false sth_registDisabled=false sth_fileMonitor=false sth_mark=false sid=cleanSession @/@connectionTimeout sname=connectionTimeout sshowLabel=true slabelAlign=right slabelVAlign=baseline smodifier=public sreadOnly=false sdefault=30 sinheritDescription=false svalidateAllowBlank=true LvalidateOnBlur=true LallowDecimals=true LallowNegative=true snotXmlAttribute=false sdescriptors=xworker.lang.MetaDescriptor3/@attribute sth_createIndex=false sth_registMyChilds=false sth_registDisabled=false sth_fileMonitor=false sth_mark=false sid=connectionTimeout @/@executorServiceTimeout sname=executorServiceTimeout sshowLabel=true slabelAlign=right slabelVAlign=baseline smodifier=public sreadOnly=false sinheritDescription=false svalidateAllowBlank=true LvalidateOnBlur=true LallowDecimals=true LallowNegative=true snotXmlAttribute=false sdescriptors=xworker.lang.MetaDescriptor3/@attribute sth_createIndex=false sth_registMyChilds=false sth_registDisabled=false sth_fileMonitor=false sth_mark=false sid=executorServiceTimeout @/@timeToWait sname=timeToWait sshowLabel=true slabelAlign=right slabelVAlign=baseline smodifier=public sreadOnly=false sdefault=10000 sinheritDescription=false sdescription=

Set the maximum time to wait for an action to complete.

svalidateAllowBlank=true LvalidateOnBlur=true LallowDecimals=true LallowNegative=true snotXmlAttribute=false sdescriptors=xworker.lang.MetaDescriptor3/@attribute sth_createIndex=false sth_registMyChilds=false sth_registDisabled=false sth_fileMonitor=false sth_mark=false sid=timeToWait @/@keepAliveInterval sname=keepAliveInterval sshowLabel=true slabelAlign=right slabelVAlign=baseline smodifier=public sreadOnly=false sdefault=20 sinheritDescription=false svalidateAllowBlank=true LvalidateOnBlur=true LallowDecimals=true LallowNegative=true snotXmlAttribute=false sdescriptors=xworker.lang.MetaDescriptor3/@attribute sth_createIndex=false sth_registMyChilds=false sth_registDisabled=false sth_fileMonitor=false sth_mark=false sid=keepAliveInterval @/@topics sname=topics sinputtype=textarea ssize=60 sshowLabel=true slabelAlign=right slabelVAlign=baseline smodifier=public sreadOnly=false sinheritDescription=false sdescription=

默认要订阅的主题,如有多个使用英文逗号分隔。

svalidateAllowBlank=true LvalidateOnBlur=true LallowDecimals=true LallowNegative=true snotXmlAttribute=false sdescriptors=xworker.lang.MetaDescriptor3/@attribute sth_createIndex=false sth_registMyChilds=false sth_registDisabled=false sth_fileMonitor=false sth_mark=false sid=topics @/@sendTopics sname=sendTopics sinputtype=textarea sshowLabel=true slabelAlign=right slabelVAlign=baseline smodifier=public sreadOnly=false sinheritDescription=false sdescription=

常用用于发送消息的主题列表。一般在工具里可能会用到。

svalidateAllowBlank=true LvalidateOnBlur=true LallowDecimals=true LallowNegative=true snotXmlAttribute=false sdescriptors=xworker.lang.MetaDescriptor3/@attribute sth_createIndex=false sth_registMyChilds=false sth_registDisabled=false sth_fileMonitor=false sth_mark=false sid=sendTopics @/@description sname=description sinputtype=html sshowLabel=true slabelAlign=right slabelVAlign=baseline smodifier=public sreadOnly=false sinheritDescription=false svalidateAllowBlank=true LvalidateOnBlur=true LallowDecimals=true LallowNegative=true snotXmlAttribute=false sdescriptors=xworker.lang.MetaDescriptor3/@attribute sth_createIndex=false sth_registMyChilds=false sth_registDisabled=false sth_fileMonitor=false sth_mark=false sid=description




© 2015 - 2024 Weber Informatics LLC | Privacy Policy