Package io.micronaut.mqtt.bind
Class DefaultMqttBinderRegistry
java.lang.Object
io.micronaut.mqtt.bind.DefaultMqttBinderRegistry
- All Implemented Interfaces:
MqttBinderRegistry
A default implementation of
MqttBinderRegistry that searches
for binders based on argument annotations, then based on the argument
type.- Since:
- 1.0.0
- Author:
- James Kleeh
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultMqttBinderRegistry(FallbackMqttBinder<?> fallbackMqttBinder, MqttBinder<?, ?>... binders) Default constructor. -
Method Summary
Modifier and TypeMethodDescription<T> MqttBinder<?,T> findArgumentBinder(io.micronaut.core.type.Argument<T> argument) Finds a binder for the given argument.
-
Constructor Details
-
DefaultMqttBinderRegistry
public DefaultMqttBinderRegistry(FallbackMqttBinder<?> fallbackMqttBinder, MqttBinder<?, ?>... binders) Default constructor.- Parameters:
fallbackMqttBinder- The binder to use when one cannot be found for an argumentbinders- The list of binders to choose from to bind an argument
-
-
Method Details
-
findArgumentBinder
Description copied from interface:MqttBinderRegistryFinds a binder for the given argument.- Specified by:
findArgumentBinderin interfaceMqttBinderRegistry- Type Parameters:
T- The argument type- Parameters:
argument- The argument- Returns:
- A binder
-