Class AdapterUtils
java.lang.Object
org.springframework.kafka.listener.adapter.AdapterUtils
Utilities for listener adapters.
- Since:
- 2.5
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.springframework.expression.ParserContextParser context for runtime SpEL using ! as the template prefix. -
Method Summary
Modifier and TypeMethodDescriptionstatic ConsumerRecordMetadataBuild aConsumerRecordMetadatafrom data which must be aConsumerRecord.static ObjectBuild aConsumerRecordMetadatafrom the firstConsumerRecordin data, if any.static StringReturn the default expression when no SendTo value is present.static booleanisAsyncReply(Class<?> resultType) Return the true when return types are asynchronous.static booleanisCompletableFuture(Class<?> resultType) Return the true when type isCompletableFuture.static booleanisKotlinContinuation(Class<?> parameterType) Return the true when type isContinuation.static booleanReturn the true when type isMono.
-
Field Details
-
PARSER_CONTEXT
public static final org.springframework.expression.ParserContext PARSER_CONTEXTParser context for runtime SpEL using ! as the template prefix.- Since:
- 2.2.15
-
-
Method Details
-
buildConsumerRecordMetadataFromArray
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
Build aConsumerRecordMetadatafrom data which must be aConsumerRecord.- Parameters:
data- the record.- Returns:
- the metadata or null if data is not a
ConsumerRecord.
-
getDefaultReplyTopicExpression
Return the default expression when no SendTo value is present.- Returns:
- the expression.
- Since:
- 2.2.15
-
isAsyncReply
Return the true when return types are asynchronous.- Parameters:
resultType-InvocableHandlerMethodreturn type.- Returns:
- type is
MonoorCompletableFuture. - Since:
- 3.2
-
isMono
Return the true when type isMono.- Parameters:
resultType-InvocableHandlerMethodreturn type.- Returns:
- type is
Mono. - Since:
- 3.2
-
isCompletableFuture
Return the true when type isCompletableFuture.- Parameters:
resultType-InvocableHandlerMethodreturn type.- Returns:
- type is
CompletableFuture. - Since:
- 3.2
-
isKotlinContinuation
Return the true when type isContinuation.- Parameters:
parameterType-MethodParameterparameter type.- Returns:
- type is
Continuation. - Since:
- 3.2.1
-