Class AdapterUtils


  • public final class AdapterUtils
    extends java.lang.Object
    Utilities for listener adapters.
    Since:
    2.5
    Author:
    Gary Russell
    • Field Detail

      • PARSER_CONTEXT

        public static final org.springframework.expression.ParserContext PARSER_CONTEXT
        Parser context for runtime SpEL using ! as the template prefix.
        Since:
        2.2.15
    • Method Detail

      • buildConsumerRecordMetadataFromArray

        @Nullable
        public static java.lang.Object buildConsumerRecordMetadataFromArray​(java.lang.Object... data)
        Build a ConsumerRecordMetadata from the first ConsumerRecord 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 a ConsumerRecordMetadata from data which must be a ConsumerRecord.
        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