Class KafkaMessagingBodyBinder<T>
java.lang.Object
io.micronaut.configuration.kafka.bind.KafkaMessagingBodyBinder<T>
- Type Parameters:
T
- The target generic type
- All Implemented Interfaces:
AnnotatedConsumerRecordBinder<io.micronaut.messaging.annotation.MessageBody,
,T> ConsumerRecordBinder<T>
,io.micronaut.core.bind.ArgumentBinder<T,
ConsumerRecord<?, ?>>
@Singleton
public class KafkaMessagingBodyBinder<T>
extends Object
implements AnnotatedConsumerRecordBinder<io.micronaut.messaging.annotation.MessageBody,T>
The default binder that binds the body of a ConsumerRecord.
- Since:
- 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
ConstructorDescriptionKafkaMessagingBodyBinder
(io.micronaut.core.convert.ConversionService conversionService) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionClass<io.micronaut.messaging.annotation.MessageBody>
io.micronaut.core.bind.ArgumentBinder.BindingResult<T>
bind
(io.micronaut.core.convert.ArgumentConversionContext<T> context, ConsumerRecord<?, ?> source)
-
Constructor Details
-
KafkaMessagingBodyBinder
public KafkaMessagingBodyBinder(io.micronaut.core.convert.ConversionService conversionService) Default constructor.- Parameters:
conversionService
- The conversion service
-
-
Method Details
-
annotationType
- Specified by:
annotationType
in interfaceAnnotatedConsumerRecordBinder<io.micronaut.messaging.annotation.MessageBody,
T> - Returns:
- The annotation type
-
bind
public io.micronaut.core.bind.ArgumentBinder.BindingResult<T> bind(io.micronaut.core.convert.ArgumentConversionContext<T> context, ConsumerRecord<?, ?> source) - Specified by:
bind
in interfaceio.micronaut.core.bind.ArgumentBinder<T,
ConsumerRecord<?, ?>>
-