Package io.micronaut.rabbitmq.bind
Class RabbitDefaultBinder
- java.lang.Object
-
- io.micronaut.rabbitmq.bind.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 theRabbitConsumerStatethat is used if no other binder supports the argument.- Since:
- 1.1.0
-
-
Constructor Summary
Constructors Constructor Description RabbitDefaultBinder(RabbitPropertyBinder propertyBinder, RabbitBodyBinder bodyBinder)Default constructor.
-
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 theBasicProperties.
-
-
-
Constructor Detail
-
RabbitDefaultBinder
public RabbitDefaultBinder(RabbitPropertyBinder propertyBinder, RabbitBodyBinder bodyBinder)
Default constructor.- Parameters:
propertyBinder- The property binderbodyBinder- 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 theBasicProperties. If the name does not match, the body of the message is bound to the argument.- Specified by:
bindin interfaceio.micronaut.core.bind.ArgumentBinder<java.lang.Object,RabbitConsumerState>- Parameters:
context- The conversion contextmessageState- The message state- Returns:
- A binding result
-
-