Package io.micronaut.rabbitmq.bind
Class RabbitDefaultBinder
java.lang.Object
io.micronaut.rabbitmq.bind.RabbitDefaultBinder
- All Implemented Interfaces:
io.micronaut.core.bind.ArgumentBinder<Object,,RabbitConsumerState> 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
ConstructorsConstructorDescriptionRabbitDefaultBinder(RabbitPropertyBinder propertyBinder, RabbitBodyBinder bodyBinder) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionio.micronaut.core.bind.ArgumentBinder.BindingResult<Object>bind(io.micronaut.core.convert.ArgumentConversionContext<Object> context, RabbitConsumerState messageState) Checks if the argument name matches one of theBasicProperties.
-
Constructor Details
-
RabbitDefaultBinder
Default constructor.- Parameters:
propertyBinder- The property binderbodyBinder- 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 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<Object,RabbitConsumerState> - Parameters:
context- The conversion contextmessageState- The message state- Returns:
- A binding result
-