Class KafkaHeaders

java.lang.Object
io.micronaut.configuration.kafka.KafkaHeaders
All Implemented Interfaces:
io.micronaut.core.convert.ConversionServiceProvider, io.micronaut.core.convert.value.ConvertibleMultiValues<String>, io.micronaut.core.convert.value.ConvertibleValues<List<String>>, io.micronaut.core.type.Headers, io.micronaut.core.type.MutableHeaders, io.micronaut.core.value.ValueResolver<CharSequence>, io.micronaut.messaging.MessageHeaders, Iterable<Map.Entry<String,List<String>>>

public class KafkaHeaders extends Object implements io.micronaut.messaging.MessageHeaders
A MessageHeaders implementation for Kafka.
Since:
1.0
Author:
Graeme Rocher
  • Constructor Details

    • KafkaHeaders

      @Deprecated public KafkaHeaders(Headers headers)
      Deprecated.
      Constructs a new instance for the given headers.
      Parameters:
      headers - The kafka headers
    • KafkaHeaders

      public KafkaHeaders(Headers headers, io.micronaut.core.convert.ConversionService conversionService)
      Constructs a new instance for the given headers.
      Parameters:
      headers - The kafka headers
      conversionService - The conversion service
  • Method Details

    • getAll

      public List<String> getAll(CharSequence name)
      Specified by:
      getAll in interface io.micronaut.core.convert.value.ConvertibleMultiValues<String>
    • get

      public String get(CharSequence name)
      Specified by:
      get in interface io.micronaut.core.convert.value.ConvertibleMultiValues<String>
    • names

      public Set<String> names()
      Specified by:
      names in interface io.micronaut.core.convert.value.ConvertibleValues<List<String>>
    • values

      public Collection<List<String>> values()
      Specified by:
      values in interface io.micronaut.core.convert.value.ConvertibleValues<List<String>>
    • get

      public <T> Optional<T> get(CharSequence name, io.micronaut.core.convert.ArgumentConversionContext<T> conversionContext)
      Specified by:
      get in interface io.micronaut.core.value.ValueResolver<CharSequence>
    • add

      public KafkaHeaders add(CharSequence header, CharSequence value)
      Specified by:
      add in interface io.micronaut.core.type.MutableHeaders
    • remove

      public KafkaHeaders remove(CharSequence header)
      Specified by:
      remove in interface io.micronaut.core.type.MutableHeaders