Package io.micronaut.mqtt.v3.intercept
Class MqttSubscriberAdvice
java.lang.Object
io.micronaut.mqtt.intercept.AbstractMqttSubscriberAdvice<org.eclipse.paho.client.mqttv3.MqttMessage>
io.micronaut.mqtt.v3.intercept.MqttSubscriberAdvice
- All Implemented Interfaces:
io.micronaut.context.processor.AnnotationProcessor<Topic,
,io.micronaut.inject.ExecutableMethod<?, ?>> io.micronaut.context.processor.ExecutableMethodProcessor<Topic>
,AutoCloseable
@Singleton
public class MqttSubscriberAdvice
extends AbstractMqttSubscriberAdvice<org.eclipse.paho.client.mqttv3.MqttMessage>
The MQTT v3 implementation of
AbstractMqttSubscriberAdvice
.- Since:
- 1.0.0
- Author:
- James Kleeh
-
Constructor Summary
ConstructorDescriptionMqttSubscriberAdvice
(io.micronaut.context.BeanContext beanContext, MqttBinderRegistry binderRegistry, MqttSubscriberExceptionHandler exceptionHandler, org.eclipse.paho.client.mqttv3.MqttAsyncClient mqttAsyncClient) -
Method Summary
Modifier and TypeMethodDescriptionvoid
subscribe
(String[] topics, int[] qos, Consumer<MqttBindingContext<org.eclipse.paho.client.mqttv3.MqttMessage>> callback) void
unsubscribe
(Set<String> topics) Methods inherited from class io.micronaut.mqtt.intercept.AbstractMqttSubscriberAdvice
close, process
-
Constructor Details
-
MqttSubscriberAdvice
public MqttSubscriberAdvice(io.micronaut.context.BeanContext beanContext, MqttBinderRegistry binderRegistry, MqttSubscriberExceptionHandler exceptionHandler, org.eclipse.paho.client.mqttv3.MqttAsyncClient mqttAsyncClient)
-
-
Method Details
-
subscribe
public void subscribe(String[] topics, int[] qos, Consumer<MqttBindingContext<org.eclipse.paho.client.mqttv3.MqttMessage>> callback) - Specified by:
subscribe
in classAbstractMqttSubscriberAdvice<org.eclipse.paho.client.mqttv3.MqttMessage>
-
unsubscribe
- Specified by:
unsubscribe
in classAbstractMqttSubscriberAdvice<org.eclipse.paho.client.mqttv3.MqttMessage>
-