Interface VariableExtractor

All Superinterfaces:
MessageProcessor, MessageTransformer

public interface VariableExtractor extends MessageProcessor
Class extracting variables form messages. Implementing classes may read message contents and save those to test variables.
Author:
Christoph Deppisch
  • Field Details

    • logger

      static final org.slf4j.Logger logger
      Logger
    • RESOURCE_PATH

      static final String RESOURCE_PATH
      Variable extractor resource lookup path
      See Also:
    • TYPE_RESOLVER

      static final TypeResolver TYPE_RESOLVER
      Type resolver to find custom variable extractors on classpath via resource path lookup
  • Method Details

    • lookup

      static <T extends VariableExtractor, B extends VariableExtractor.Builder<T, B>> Optional<VariableExtractor.Builder<T,B>> lookup(String extractor)
      Resolves extractor from resource path lookup with given extractor resource name. Scans classpath for extractor meta information with given name and returns instance of extractor. Returns optional instead of throwing exception when no extractor could be found.
      Parameters:
      extractor -
      Returns:
    • process

      default void process(Message message, TestContext context)
      Description copied from interface: MessageProcessor
      Process message with given test context. Processors can change the message payload and headers.
      Specified by:
      process in interface MessageProcessor
      Parameters:
      message - the message to process.
      context - the current test context.
    • extractVariables

      void extractVariables(Message message, TestContext context)
      Extract variables from given message.
      Parameters:
      message -
      context -