@Singleton public class PayloadMqttBinder extends java.lang.Object implements AnnotatedMqttBinder<MqttBindingContext<?>,io.micronaut.messaging.annotation.Body>
| Constructor and Description |
|---|
PayloadMqttBinder(MqttPayloadSerDesRegistry serDesRegistry) |
| Modifier and Type | Method and Description |
|---|---|
java.util.Optional<java.lang.Object> |
bindFrom(MqttBindingContext<?> context,
io.micronaut.core.convert.ArgumentConversionContext<java.lang.Object> conversionContext)
Binds the given context and returns an optional value.
|
void |
bindTo(MqttBindingContext<?> context,
java.lang.Object value,
io.micronaut.core.type.Argument<java.lang.Object> argument)
Binds the given value to the given context.
|
java.lang.Class<io.micronaut.messaging.annotation.Body> |
getAnnotationType() |
public PayloadMqttBinder(MqttPayloadSerDesRegistry serDesRegistry)
public java.lang.Class<io.micronaut.messaging.annotation.Body> getAnnotationType()
getAnnotationType in interface AnnotatedMqttBinder<MqttBindingContext<?>,io.micronaut.messaging.annotation.Body>public void bindTo(MqttBindingContext<?> context, java.lang.Object value, io.micronaut.core.type.Argument<java.lang.Object> argument)
MqttBinderbindTo in interface MqttBinder<MqttBindingContext<?>,java.lang.Object>context - The message contextvalue - The argument valueargument - The publisher argumentpublic java.util.Optional<java.lang.Object> bindFrom(MqttBindingContext<?> context, io.micronaut.core.convert.ArgumentConversionContext<java.lang.Object> conversionContext)
MqttBinderbindFrom in interface MqttBinder<MqttBindingContext<?>,java.lang.Object>context - The method contextconversionContext - The argument conversion context