Package io.micronaut.mqtt.bind
Interface MqttBinder<M,T>
- Type Parameters:
M
- The message contextT
- The type
- All Known Subinterfaces:
AnnotatedMqttBinder<M,
,T> FallbackMqttBinder<M>
,TypedMqttBinder<M,
T>
- All Known Implementing Classes:
AcknowledgeMqttBinder
,DefaultMqttBinder
,IdMqttBinder
,MqttPropertyBinder
,MqttPropertyBinder
,PayloadMqttBinder
,QosMqttBinder
,RetainedMqttBinder
,TopicMqttBinder
public interface MqttBinder<M,T>
Argument binder to bind publisher and subscriber method arguments
to and from the message context.
-
Method Summary
Modifier and TypeMethodDescriptionBinds the given context and returns an optional value.void
Binds the given value to the given context.
-
Method Details
-
bindTo
Binds the given value to the given context. Publisher method arguments will be passed to this method.- Parameters:
context
- The message contextvalue
- The argument valueargument
- The publisher argument
-
bindFrom
Optional<T> bindFrom(M context, io.micronaut.core.convert.ArgumentConversionContext<T> conversionContext) Binds the given context and returns an optional value. Subscriber method arguments will be passed to this method.- Parameters:
context
- The method contextconversionContext
- The argument conversion context- Returns:
- An optional value
-