public class KafkaHeaders
extends java.lang.Object
implements io.micronaut.messaging.MessageHeaders
MessageHeaders
implementation for Kafka.Constructor and Description |
---|
KafkaHeaders(org.apache.kafka.common.header.Headers headers)
Constructs a new instance for the given headers.
|
Modifier and Type | Method and Description |
---|---|
KafkaHeaders |
add(java.lang.CharSequence header,
java.lang.CharSequence value) |
java.lang.String |
get(java.lang.CharSequence name) |
<T> java.util.Optional<T> |
get(java.lang.CharSequence name,
io.micronaut.core.convert.ArgumentConversionContext<T> conversionContext) |
java.util.List<java.lang.String> |
getAll(java.lang.CharSequence name) |
java.util.Set<java.lang.String> |
names() |
KafkaHeaders |
remove(java.lang.CharSequence header) |
java.util.Collection<java.util.List<java.lang.String>> |
values() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
empty, forEachValue, getFirst, getFirst, getFirst, getFirst, isEmpty, iterator, of
public KafkaHeaders(org.apache.kafka.common.header.Headers headers)
headers
- The kafka headerspublic java.util.List<java.lang.String> getAll(java.lang.CharSequence name)
getAll
in interface io.micronaut.core.convert.value.ConvertibleMultiValues<java.lang.String>
public java.lang.String get(java.lang.CharSequence name)
get
in interface io.micronaut.core.convert.value.ConvertibleMultiValues<java.lang.String>
public java.util.Set<java.lang.String> names()
names
in interface io.micronaut.core.convert.value.ConvertibleValues<java.util.List<java.lang.String>>
public java.util.Collection<java.util.List<java.lang.String>> values()
values
in interface io.micronaut.core.convert.value.ConvertibleValues<java.util.List<java.lang.String>>
public <T> java.util.Optional<T> get(java.lang.CharSequence name, io.micronaut.core.convert.ArgumentConversionContext<T> conversionContext)
get
in interface io.micronaut.core.value.ValueResolver<java.lang.CharSequence>
public KafkaHeaders add(java.lang.CharSequence header, java.lang.CharSequence value)
add
in interface io.micronaut.core.type.MutableHeaders
public KafkaHeaders remove(java.lang.CharSequence header)
remove
in interface io.micronaut.core.type.MutableHeaders