Package io.micronaut.mqtt.v5.intercept
Class MqttSubscriberAdvice
java.lang.Object
io.micronaut.mqtt.intercept.AbstractMqttSubscriberAdvice<org.eclipse.paho.mqttv5.common.MqttMessage>
io.micronaut.mqtt.v5.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.mqttv5.common.MqttMessage>
The MQTT v5 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.mqttv5.client.MqttAsyncClient mqttAsyncClient) -
Method Summary
Modifier and TypeMethodDescriptionvoid
subscribe
(String[] topics, int[] qos, Consumer<MqttBindingContext<org.eclipse.paho.mqttv5.common.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.mqttv5.client.MqttAsyncClient mqttAsyncClient)
-
-
Method Details
-
subscribe
public void subscribe(String[] topics, int[] qos, Consumer<MqttBindingContext<org.eclipse.paho.mqttv5.common.MqttMessage>> callback) - Specified by:
subscribe
in classAbstractMqttSubscriberAdvice<org.eclipse.paho.mqttv5.common.MqttMessage>
-
unsubscribe
- Specified by:
unsubscribe
in classAbstractMqttSubscriberAdvice<org.eclipse.paho.mqttv5.common.MqttMessage>
-