Class AdapterUtils
- java.lang.Object
-
- org.springframework.kafka.listener.adapter.AdapterUtils
-
public final class AdapterUtils extends java.lang.Object
Utilities for listener adapters.- Since:
- 2.5
- Author:
- Gary Russell
-
-
Field Summary
Fields Modifier and Type Field Description static org.springframework.expression.ParserContext
PARSER_CONTEXT
Parser context for runtime SpEL using ! as the template prefix.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ConsumerRecordMetadata
buildConsumerRecordMetadata(java.lang.Object data)
Build aConsumerRecordMetadata
from data which must be aConsumerRecord
.static java.lang.Object
buildConsumerRecordMetadataFromArray(java.lang.Object... data)
Build aConsumerRecordMetadata
from the firstConsumerRecord
in data, if any.static java.lang.String
getDefaultReplyTopicExpression()
Return the default expression when no SendTo value is present.
-
-
-
Method Detail
-
buildConsumerRecordMetadataFromArray
@Nullable public static java.lang.Object buildConsumerRecordMetadataFromArray(java.lang.Object... data)
Build aConsumerRecordMetadata
from the firstConsumerRecord
in data, if any.- Parameters:
data
- the data array.- Returns:
- the metadata or null if data does not contain a
ConsumerRecord
.
-
buildConsumerRecordMetadata
@Nullable public static ConsumerRecordMetadata buildConsumerRecordMetadata(java.lang.Object data)
Build aConsumerRecordMetadata
from data which must be aConsumerRecord
.- Parameters:
data
- the record.- Returns:
- the metadata or null if data is not a
ConsumerRecord
.
-
getDefaultReplyTopicExpression
public static java.lang.String getDefaultReplyTopicExpression()
Return the default expression when no SendTo value is present.- Returns:
- the expression.
- Since:
- 2.2.15
-
-