Class DefaultMqttBinderRegistry

java.lang.Object
io.micronaut.mqtt.bind.DefaultMqttBinderRegistry
All Implemented Interfaces:
MqttBinderRegistry

@Singleton public class DefaultMqttBinderRegistry extends Object implements MqttBinderRegistry
A default implementation of MqttBinderRegistry that searches for binders based on argument annotations, then based on the argument type.
Since:
1.0.0
Author:
James Kleeh
  • Constructor Details

    • DefaultMqttBinderRegistry

      public DefaultMqttBinderRegistry(FallbackMqttBinder<?> fallbackMqttBinder, MqttBinder<?,?>... binders)
      Default constructor.
      Parameters:
      fallbackMqttBinder - The binder to use when one cannot be found for an argument
      binders - The list of binders to choose from to bind an argument
  • Method Details

    • findArgumentBinder

      public <T> MqttBinder<?,T> findArgumentBinder(io.micronaut.core.type.Argument<T> argument)
      Description copied from interface: MqttBinderRegistry
      Finds a binder for the given argument.
      Specified by:
      findArgumentBinder in interface MqttBinderRegistry
      Type Parameters:
      T - The argument type
      Parameters:
      argument - The argument
      Returns:
      A binder