Class RabbitDefaultBinder

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

    @Singleton
    public class RabbitDefaultBinder
    extends java.lang.Object
    implements RabbitArgumentBinder<java.lang.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
    • Nested Class Summary

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

        io.micronaut.core.bind.ArgumentBinder.BindingResult<T extends java.lang.Object>
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      io.micronaut.core.bind.ArgumentBinder.BindingResult<java.lang.Object> bind​(io.micronaut.core.convert.ArgumentConversionContext<java.lang.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
    • Constructor Detail

      • RabbitDefaultBinder

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

      • bind

        public io.micronaut.core.bind.ArgumentBinder.BindingResult<java.lang.Object> bind​(io.micronaut.core.convert.ArgumentConversionContext<java.lang.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<java.lang.Object,​RabbitConsumerState>
        Parameters:
        context - The conversion context
        messageState - The message state
        Returns:
        A binding result