Class AcknowledgeMqttBinder

java.lang.Object
io.micronaut.mqtt.bind.impl.AcknowledgeMqttBinder
All Implemented Interfaces:
MqttBinder<MqttBindingContext<?>,io.micronaut.messaging.Acknowledgement>, TypedMqttBinder<MqttBindingContext<?>,io.micronaut.messaging.Acknowledgement>

@Singleton public class AcknowledgeMqttBinder extends Object implements TypedMqttBinder<MqttBindingContext<?>,io.micronaut.messaging.Acknowledgement>
A typed binder for Acknowledgement that allows subscribers to manually acknowledge messages. An Acknowledgement must be an argument to subscriber methods and used when manual acknowledgements is set to true in the configuration.
Since:
1.0.0
Author:
James Kleeh
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Optional<io.micronaut.messaging.Acknowledgement>
    bindFrom(MqttBindingContext<?> context, io.micronaut.core.convert.ArgumentConversionContext<io.micronaut.messaging.Acknowledgement> conversionContext)
    Binds the given context and returns an optional value.
    void
    bindTo(MqttBindingContext<?> context, io.micronaut.messaging.Acknowledgement value, io.micronaut.core.type.Argument<io.micronaut.messaging.Acknowledgement> argument)
    Binds the given value to the given context.
    io.micronaut.core.type.Argument<io.micronaut.messaging.Acknowledgement>
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AcknowledgeMqttBinder

      public AcknowledgeMqttBinder()
  • Method Details

    • getArgumentType

      public io.micronaut.core.type.Argument<io.micronaut.messaging.Acknowledgement> getArgumentType()
      Specified by:
      getArgumentType in interface TypedMqttBinder<MqttBindingContext<?>,io.micronaut.messaging.Acknowledgement>
    • bindTo

      public void bindTo(MqttBindingContext<?> context, io.micronaut.messaging.Acknowledgement value, io.micronaut.core.type.Argument<io.micronaut.messaging.Acknowledgement> argument)
      Description copied from interface: MqttBinder
      Binds the given value to the given context. Publisher method arguments will be passed to this method.
      Specified by:
      bindTo in interface MqttBinder<MqttBindingContext<?>,io.micronaut.messaging.Acknowledgement>
      Parameters:
      context - The message context
      value - The argument value
      argument - The publisher argument
    • bindFrom

      public Optional<io.micronaut.messaging.Acknowledgement> bindFrom(MqttBindingContext<?> context, io.micronaut.core.convert.ArgumentConversionContext<io.micronaut.messaging.Acknowledgement> conversionContext)
      Description copied from interface: MqttBinder
      Binds the given context and returns an optional value. Subscriber method arguments will be passed to this method.
      Specified by:
      bindFrom in interface MqttBinder<MqttBindingContext<?>,io.micronaut.messaging.Acknowledgement>
      Parameters:
      context - The method context
      conversionContext - The argument conversion context
      Returns:
      An optional value