public class MQTTService
extends java.lang.Object
implements java.lang.AutoCloseable
| Constructor and Description |
|---|
MQTTService() |
MQTTService(MqttClient mqtt) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
connectionLost(java.lang.Throwable ex) |
void |
deliveryComplete(IMqttDeliveryToken deliveryComplete) |
static Message |
fromPahoMessage(MqttMessage msg,
java.lang.String topic)
Converts a Paho
MqttMessage into an own one |
void |
messageArrived(java.lang.String topic,
MqttMessage message) |
void |
publish(java.lang.String topic,
java.nio.ByteBuffer content) |
void |
publish(java.lang.String topic,
java.nio.ByteBuffer content,
MessagingContext context) |
<any> |
subscribe(java.lang.String topic) |
<any> |
subscribe(java.lang.String topic,
MessagingContext context) |
public void close()
throws java.lang.Exception
close in interface java.lang.AutoCloseablejava.lang.Exceptionpublic void connectionLost(java.lang.Throwable ex)
public void deliveryComplete(IMqttDeliveryToken deliveryComplete)
public void messageArrived(java.lang.String topic,
MqttMessage message)
throws java.lang.Exception
java.lang.Exceptionpublic <any> subscribe(java.lang.String topic)
throws java.lang.Exception
java.lang.Exceptionpublic <any> subscribe(java.lang.String topic,
MessagingContext context)
throws java.lang.Exception
java.lang.Exceptionpublic void publish(java.lang.String topic,
java.nio.ByteBuffer content)
throws java.lang.Exception
java.lang.Exceptionpublic void publish(java.lang.String topic,
java.nio.ByteBuffer content,
MessagingContext context)
throws java.lang.Exception
java.lang.Exceptionpublic static Message fromPahoMessage(MqttMessage msg,
java.lang.String topic)
MqttMessage into an own onemsg - the original messagetopic - the topicData In Motion Consulting (c) 2017