@Singleton public class MqttIntroductionAdvice extends AbstractMqttIntroductionAdvice<org.eclipse.paho.client.mqttv3.IMqttActionListener,org.eclipse.paho.client.mqttv3.MqttMessage>
AbstractMqttIntroductionAdvice.| Constructor and Description |
|---|
MqttIntroductionAdvice(org.eclipse.paho.client.mqttv3.MqttAsyncClient mqttAsyncClient,
MqttBinderRegistry binderRegistry) |
| Modifier and Type | Method and Description |
|---|---|
MqttBindingContext<org.eclipse.paho.client.mqttv3.MqttMessage> |
createBindingContext(io.micronaut.aop.MethodInvocationContext<java.lang.Object,java.lang.Object> context) |
org.eclipse.paho.client.mqttv3.IMqttActionListener |
createListener(java.lang.Runnable onSuccess,
java.util.function.Consumer<java.lang.Throwable> onError)
Create a listener.
|
java.lang.Class<? extends java.lang.annotation.Annotation> |
getRequiredAnnotation() |
java.lang.Object |
publish(java.lang.String topic,
org.eclipse.paho.client.mqttv3.MqttMessage message,
org.eclipse.paho.client.mqttv3.IMqttActionListener listener)
Publishes the message.
|
interceptpublic MqttIntroductionAdvice(org.eclipse.paho.client.mqttv3.MqttAsyncClient mqttAsyncClient,
MqttBinderRegistry binderRegistry)
public MqttBindingContext<org.eclipse.paho.client.mqttv3.MqttMessage> createBindingContext(io.micronaut.aop.MethodInvocationContext<java.lang.Object,java.lang.Object> context)
createBindingContext in class AbstractMqttIntroductionAdvice<org.eclipse.paho.client.mqttv3.IMqttActionListener,org.eclipse.paho.client.mqttv3.MqttMessage>context - The method contextpublic java.lang.Object publish(java.lang.String topic,
org.eclipse.paho.client.mqttv3.MqttMessage message,
org.eclipse.paho.client.mqttv3.IMqttActionListener listener)
AbstractMqttIntroductionAdvicepublish in class AbstractMqttIntroductionAdvice<org.eclipse.paho.client.mqttv3.IMqttActionListener,org.eclipse.paho.client.mqttv3.MqttMessage>topic - The topic to publish the message tomessage - The message to publishlistener - The publish action listenerpublic org.eclipse.paho.client.mqttv3.IMqttActionListener createListener(java.lang.Runnable onSuccess,
java.util.function.Consumer<java.lang.Throwable> onError)
AbstractMqttIntroductionAdvicecreateListener in class AbstractMqttIntroductionAdvice<org.eclipse.paho.client.mqttv3.IMqttActionListener,org.eclipse.paho.client.mqttv3.MqttMessage>onSuccess - The code to call when a message is sent successfullyonError - The consumer to call in the case of an exceptionpublic java.lang.Class<? extends java.lang.annotation.Annotation> getRequiredAnnotation()
getRequiredAnnotation in class AbstractMqttIntroductionAdvice<org.eclipse.paho.client.mqttv3.IMqttActionListener,org.eclipse.paho.client.mqttv3.MqttMessage>