Hi,
how can I set
"setConnectionTimeout", "setKeepAliveInterval", "setAutomaticReconnect", "setMqttVersion" and "setMaxInflight"?
fails with
java.lang.RuntimeException: Method: getMaxInflight not found in: org.eclipse.paho.client.mqttv3.MqttConnectOptions
java.lang.RuntimeException: Method: isAutomaticReconnect not found in: org.eclipse.paho.client.mqttv3.MqttConnectOptions
java.lang.RuntimeException: Method: setAutomaticReconnect not found in: org.eclipse.paho.client.mqttv3.MqttConnectOptions
java.lang.RuntimeException: Method: setCleanSession( not found in: org.eclipse.paho.client.mqttv3.MqttConnectOptions
============== Connection options ==============
CleanSession : true
SocketFactory : null
MqttVersion : 0
KeepAliveInterval : 60
ConTimeout : 30
UserName : null
SSLProperties : null
WillDestination : null
==========================================
getConnectionTimeout:30
getDebug:{SocketFactory=null, CleanSession=true, MqttVersion=0, KeepAliveInterval=60, ConTimeout=30, UserName=null, SSLProperties=null, WillDestination=null}
getKeepAliveInterval:60
getMqttVersion:0
getPassword:null
getServerURIs:null
getSocketFactory:null
getSSLProperties:null
getUserName:null
getWillDestination:null
getWillMessage:null
isCleanSession:true
setKeepAliveInterval:null
THX
how can I set
"setConnectionTimeout", "setKeepAliveInterval", "setAutomaticReconnect", "setMqttVersion" and "setMaxInflight"?
fails with
java.lang.RuntimeException: Method: getMaxInflight not found in: org.eclipse.paho.client.mqttv3.MqttConnectOptions
java.lang.RuntimeException: Method: isAutomaticReconnect not found in: org.eclipse.paho.client.mqttv3.MqttConnectOptions
java.lang.RuntimeException: Method: setAutomaticReconnect not found in: org.eclipse.paho.client.mqttv3.MqttConnectOptions
java.lang.RuntimeException: Method: setCleanSession( not found in: org.eclipse.paho.client.mqttv3.MqttConnectOptions
B4X:
Dim obj,jo As JavaObject
Dim result As String
obj = jo.InitializeNewInstance("org.eclipse.paho.client.mqttv3.MqttConnectOptions",Null)
Log("Object Test result:" & obj)
result= obj.RunMethod("getConnectionTimeout",Null)
Log("getConnectionTimeout:" & result)
result= obj.RunMethod("getDebug",Null)
Log("getDebug:" & result)
result= obj.RunMethod("getKeepAliveInterval",Null)
Log("getKeepAliveInterval:" & result)
'result= obj.RunMethod("getMaxInflight",Null)
'Log("getMaxInflight:" & result)
result= obj.RunMethod("getMqttVersion",Null)
Log("getMqttVersion:" & result)
result= obj.RunMethod("getPassword",Null)
Log("getPassword:" & result)
result= obj.RunMethod("getServerURIs",Null)
Log("getServerURIs:" & result)
result= obj.RunMethod("getSocketFactory",Null)
Log("getSocketFactory:" & result)
result= obj.RunMethod("getSSLProperties",Null)
Log("getSSLProperties:" & result)
result= obj.RunMethod("getUserName",Null)
Log("getUserName:" & result)
result= obj.RunMethod("getWillDestination",Null)
Log("getWillDestination:" & result)
result= obj.RunMethod("getWillMessage",Null)
Log("getWillMessage:" & result)
'result= obj.RunMethod("isAutomaticReconnect",Null)
'Log("isAutomaticReconnect:" & result)
result= obj.RunMethod("isCleanSession",Null)
Log("isCleanSession:" & result)
'result= obj.RunMethod("setAutomaticReconnect",Null)
'Log("setAutomaticReconnect:" & result)
'result= obj.RunMethod("setCleanSession(",Null)
'Log("setCleanSession:" & result)
result= obj.RunMethod("setConnectionTimeout",Array As Object( 20 )) 'not working
Log("setConnectionTimeout:" & result)
result= obj.RunMethod("setKeepAliveInterval",Array As Object( 20 )) 'not working
Log("setKeepAliveInterval:" & result)
'result= obj.RunMethod("setMaxInflight",Null)
'Log("setMaxInflight:" & result)
result= obj.RunMethod("setMqttVersion",Array As Object( 0 )) 'not working
Log("setMqttVersion:" & result)
'result= obj.RunMethod("setPassword",Null)
'Log("setPassword:" & result)
'result= obj.RunMethod("setServerURIs",Null)
'Log("setServerURIs:" & result)
'result= obj.RunMethod("setSSLProperties",Null)
'Log("setSSLProperties:" & result)
'result= obj.RunMethod("setUserName",Null)
'Log("setUserName:" & result)
'result= obj.RunMethod("setWill",Null)
'Log("setWill:" & result)
============== Connection options ==============
CleanSession : true
SocketFactory : null
MqttVersion : 0
KeepAliveInterval : 60
ConTimeout : 30
UserName : null
SSLProperties : null
WillDestination : null
==========================================
getConnectionTimeout:30
getDebug:{SocketFactory=null, CleanSession=true, MqttVersion=0, KeepAliveInterval=60, ConTimeout=30, UserName=null, SSLProperties=null, WillDestination=null}
getKeepAliveInterval:60
getMqttVersion:0
getPassword:null
getServerURIs:null
getSocketFactory:null
getSSLProperties:null
getUserName:null
getWillDestination:null
getWillMessage:null
isCleanSession:true
setKeepAliveInterval:null
THX