Interface MqttBinder<M,T>

Type Parameters:
M - The message context
T - The type
All Known Subinterfaces:
AnnotatedMqttBinder<M,T>, FallbackMqttBinder<M>, TypedMqttBinder<M,T>
All Known Implementing Classes:
AcknowledgeMqttBinder, DefaultMqttBinder, IdMqttBinder, MqttPropertyBinder, MqttPropertyBinder, PayloadMqttBinder, QosMqttBinder, RetainedMqttBinder, TopicMqttBinder

public interface MqttBinder<M,T>
Argument binder to bind publisher and subscriber method arguments to and from the message context.
  • Method Summary

    Modifier and Type
    Method
    Description
    bindFrom(M context, io.micronaut.core.convert.ArgumentConversionContext<T> conversionContext)
    Binds the given context and returns an optional value.
    void
    bindTo(M context, T value, io.micronaut.core.type.Argument<T> argument)
    Binds the given value to the given context.
  • Method Details

    • bindTo

      void bindTo(M context, T value, io.micronaut.core.type.Argument<T> argument)
      Binds the given value to the given context. Publisher method arguments will be passed to this method.
      Parameters:
      context - The message context
      value - The argument value
      argument - The publisher argument
    • bindFrom

      Optional<T> bindFrom(M context, io.micronaut.core.convert.ArgumentConversionContext<T> conversionContext)
      Binds the given context and returns an optional value. Subscriber method arguments will be passed to this method.
      Parameters:
      context - The method context
      conversionContext - The argument conversion context
      Returns:
      An optional value