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

    Fields
    Modifier and Type
    Field
    Description
    static final io.micronaut.core.bind.ArgumentBinder.BindingResult<?>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    KafkaMessageHeaderBinder(io.micronaut.core.convert.ConversionService conversionService)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Class<io.micronaut.messaging.annotation.MessageHeader>
     
    io.micronaut.core.bind.ArgumentBinder.BindingResult<T>
    bind(io.micronaut.core.convert.ArgumentConversionContext<T> context, ConsumerRecord<?,?> source)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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

      public Class<io.micronaut.messaging.annotation.MessageHeader> annotationType()
      Specified by:
      annotationType in interface AnnotatedConsumerRecordBinder<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 interface io.micronaut.core.bind.ArgumentBinder<T,ConsumerRecord<?,?>>