Class KafkaMessageHeaderBinder<T>
java.lang.Object
io.micronaut.configuration.kafka.bind.KafkaMessageHeaderBinder<T>
- Type Parameters:
T
- The generic type
- All Implemented Interfaces:
AnnotatedConsumerRecordBinder<io.micronaut.messaging.annotation.MessageHeader,
,T> ConsumerRecordBinder<T>
,io.micronaut.core.bind.ArgumentBinder<T,
ConsumerRecord<?, ?>>
@Singleton
public class KafkaMessageHeaderBinder<T>
extends Object
implements AnnotatedConsumerRecordBinder<io.micronaut.messaging.annotation.MessageHeader,T>
Binds message headers.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.micronaut.core.bind.ArgumentBinder
io.micronaut.core.bind.ArgumentBinder.BindingResult<T extends Object>
-
Field Summary
Modifier and TypeFieldDescriptionstatic final io.micronaut.core.bind.ArgumentBinder.BindingResult<?>
-
Constructor Summary
ConstructorDescriptionKafkaMessageHeaderBinder
(io.micronaut.core.convert.ConversionService conversionService) -
Method Summary
Modifier and TypeMethodDescriptionClass<io.micronaut.messaging.annotation.MessageHeader>
io.micronaut.core.bind.ArgumentBinder.BindingResult<T>
bind
(io.micronaut.core.convert.ArgumentConversionContext<T> context, ConsumerRecord<?, ?> source)
-
Field Details
-
EMPTY_OPTIONAL
public static final io.micronaut.core.bind.ArgumentBinder.BindingResult<?> EMPTY_OPTIONAL
-
-
Constructor Details
-
KafkaMessageHeaderBinder
public KafkaMessageHeaderBinder(io.micronaut.core.convert.ConversionService conversionService)
-
-
Method Details
-
annotationType
- Specified by:
annotationType
in interfaceAnnotatedConsumerRecordBinder<io.micronaut.messaging.annotation.MessageHeader,
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<?, ?>>
-