Class AbstractMqttSubscriberAdvice<M>

java.lang.Object
io.micronaut.mqtt.intercept.AbstractMqttSubscriberAdvice<M>
Type Parameters:
M - The specific message type
All Implemented Interfaces:
io.micronaut.context.processor.AnnotationProcessor<Topic,io.micronaut.inject.ExecutableMethod<?,?>>, io.micronaut.context.processor.ExecutableMethodProcessor<Topic>, AutoCloseable
Direct Known Subclasses:
MqttSubscriberAdvice, MqttSubscriberAdvice, MqttSubscriberAdvice

public abstract class AbstractMqttSubscriberAdvice<M> extends Object implements io.micronaut.context.processor.ExecutableMethodProcessor<Topic>, AutoCloseable
An ExecutableMethodProcessor that will process all beans annotated with MqttSubscriber and create and subscribe the relevant methods as consumers to MQTT topics.
Since:
1.0.0
Author:
James Kleeh
  • Constructor Details

  • Method Details

    • process

      public void process(io.micronaut.inject.BeanDefinition<?> beanDefinition, io.micronaut.inject.ExecutableMethod<?,?> method)
      Specified by:
      process in interface io.micronaut.context.processor.AnnotationProcessor<Topic,io.micronaut.inject.ExecutableMethod<?,?>>
      Specified by:
      process in interface io.micronaut.context.processor.ExecutableMethodProcessor<M>
    • subscribe

      public abstract void subscribe(String[] topics, int[] qos, Consumer<MqttBindingContext<M>> callback)
    • unsubscribe

      public abstract void unsubscribe(Set<String> topics)
    • close

      public void close() throws Exception
      Specified by:
      close in interface AutoCloseable
      Throws:
      Exception