Class RetainedMqttBinder
java.lang.Object
io.micronaut.mqtt.bind.impl.RetainedMqttBinder
- All Implemented Interfaces:
AnnotatedMqttBinder<MqttBindingContext<?>, Retained>, MqttBinder<MqttBindingContext<?>, Object>
@Singleton
public class RetainedMqttBinder
extends Object
implements AnnotatedMqttBinder<MqttBindingContext<?>, Retained>
An annotated argument binder for
Retained.- Since:
- 1.0.0
- Author:
- James Kleeh
-
Constructor Summary
ConstructorsConstructorDescriptionRetainedMqttBinder(io.micronaut.core.convert.ConversionService conversionService) -
Method Summary
Modifier and TypeMethodDescriptionbindFrom(MqttBindingContext<?> message, io.micronaut.core.convert.ArgumentConversionContext<Object> conversionContext) Binds the given context and returns an optional value.voidbindTo(MqttBindingContext<?> message, Object value, io.micronaut.core.type.Argument<Object> argument) Binds the given value to the given context.
-
Constructor Details
-
RetainedMqttBinder
public RetainedMqttBinder(io.micronaut.core.convert.ConversionService conversionService)
-
-
Method Details
-
getAnnotationType
- Specified by:
getAnnotationTypein interfaceAnnotatedMqttBinder<MqttBindingContext<?>, Retained>- Returns:
- The annotation type
-
bindTo
public void bindTo(MqttBindingContext<?> message, Object value, io.micronaut.core.type.Argument<Object> argument) Description copied from interface:MqttBinderBinds the given value to the given context. Publisher method arguments will be passed to this method.- Specified by:
bindToin interfaceMqttBinder<MqttBindingContext<?>, Object>- Parameters:
message- The message contextvalue- The argument valueargument- The publisher argument
-
bindFrom
public Optional<Object> bindFrom(MqttBindingContext<?> message, io.micronaut.core.convert.ArgumentConversionContext<Object> conversionContext) Description copied from interface:MqttBinderBinds the given context and returns an optional value. Subscriber method arguments will be passed to this method.- Specified by:
bindFromin interfaceMqttBinder<MqttBindingContext<?>, Object>- Parameters:
message- The method contextconversionContext- The argument conversion context- Returns:
- An optional value
-