Class AdapterUtils
- java.lang.Object
-
- org.springframework.kafka.listener.adapter.AdapterUtils
-
public final class AdapterUtils extends java.lang.ObjectUtilities for listener adapters.- Since:
- 2.5
- Author:
- Gary Russell
-
-
Field Summary
Fields Modifier and Type Field Description static org.springframework.expression.ParserContextPARSER_CONTEXTParser context for runtime SpEL using ! as the template prefix.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ConsumerRecordMetadatabuildConsumerRecordMetadata(java.lang.Object data)Build aConsumerRecordMetadatafrom data which must be aConsumerRecord.static java.lang.ObjectbuildConsumerRecordMetadataFromArray(java.lang.Object... data)Build aConsumerRecordMetadatafrom the firstConsumerRecordin data, if any.static java.lang.StringgetDefaultReplyTopicExpression()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 aConsumerRecordMetadatafrom the firstConsumerRecordin 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 aConsumerRecordMetadatafrom 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
-
-