Class RabbitDefaultBinder

java.lang.Object
io.micronaut.rabbitmq.bind.RabbitDefaultBinder
All Implemented Interfaces:
io.micronaut.core.bind.ArgumentBinder<Object,RabbitConsumerState>, RabbitArgumentBinder<Object>

@Singleton public class RabbitDefaultBinder extends Object implements RabbitArgumentBinder<Object>
The default binder for binding an argument from the RabbitConsumerState that is used if no other binder supports the argument.
Since:
1.1.0
Author:
James Kleeh
  • Constructor Details

    • RabbitDefaultBinder

      public RabbitDefaultBinder(RabbitPropertyBinder propertyBinder, RabbitBodyBinder bodyBinder)
      Default constructor.
      Parameters:
      propertyBinder - The property binder
      bodyBinder - The body binder
  • Method Details

    • bind

      public io.micronaut.core.bind.ArgumentBinder.BindingResult<Object> bind(io.micronaut.core.convert.ArgumentConversionContext<Object> context, RabbitConsumerState messageState)
      Checks if the argument name matches one of the BasicProperties. If the name does not match, the body of the message is bound to the argument.
      Specified by:
      bind in interface io.micronaut.core.bind.ArgumentBinder<Object,RabbitConsumerState>
      Parameters:
      context - The conversion context
      messageState - The message state
      Returns:
      A binding result