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
  • Nested Class Summary

    Nested classes/interfaces inherited from interface io.micronaut.core.bind.ArgumentBinder

    io.micronaut.core.bind.ArgumentBinder.BindingResult<T extends Object>
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.micronaut.core.bind.ArgumentBinder

    createSpecific
  • 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