Class KafkaHeadersBinder
java.lang.Object
io.micronaut.configuration.kafka.bind.KafkaHeadersBinder
- All Implemented Interfaces:
ConsumerRecordBinder<io.micronaut.messaging.MessageHeaders>
,TypedConsumerRecordBinder<io.micronaut.messaging.MessageHeaders>
,io.micronaut.core.bind.ArgumentBinder<io.micronaut.messaging.MessageHeaders,
,ConsumerRecord<?, ?>> io.micronaut.core.bind.TypeArgumentBinder<io.micronaut.messaging.MessageHeaders,
ConsumerRecord<?, ?>>
@Singleton
public class KafkaHeadersBinder
extends Object
implements TypedConsumerRecordBinder<io.micronaut.messaging.MessageHeaders>
Obtains the
MessageHeaders
object for Kafka.- Since:
- 1.0
- Author:
- Graeme Rocher
-
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.type.Argument<io.micronaut.messaging.MessageHeaders>
-
Constructor Summary
ConstructorDescriptionKafkaHeadersBinder
(io.micronaut.core.convert.ConversionService conversionService) -
Method Summary
Modifier and TypeMethodDescriptionio.micronaut.core.type.Argument<io.micronaut.messaging.MessageHeaders>
io.micronaut.core.bind.ArgumentBinder.BindingResult<io.micronaut.messaging.MessageHeaders>
bind
(io.micronaut.core.convert.ArgumentConversionContext<io.micronaut.messaging.MessageHeaders> context, ConsumerRecord<?, ?> source)
-
Field Details
-
TYPE
public static final io.micronaut.core.type.Argument<io.micronaut.messaging.MessageHeaders> TYPE
-
-
Constructor Details
-
KafkaHeadersBinder
public KafkaHeadersBinder(io.micronaut.core.convert.ConversionService conversionService)
-
-
Method Details
-
argumentType
public io.micronaut.core.type.Argument<io.micronaut.messaging.MessageHeaders> argumentType()- Specified by:
argumentType
in interfaceio.micronaut.core.bind.TypeArgumentBinder<io.micronaut.messaging.MessageHeaders,
ConsumerRecord<?, ?>>
-
bind
public io.micronaut.core.bind.ArgumentBinder.BindingResult<io.micronaut.messaging.MessageHeaders> bind(io.micronaut.core.convert.ArgumentConversionContext<io.micronaut.messaging.MessageHeaders> context, ConsumerRecord<?, ?> source) - Specified by:
bind
in interfaceio.micronaut.core.bind.ArgumentBinder<io.micronaut.messaging.MessageHeaders,
ConsumerRecord<?, ?>>
-