Interface MessageProcessor

    • Field Detail

      • LOG

        static final org.slf4j.Logger LOG
        Logger
      • TYPE_RESOLVER

        static final TypeResolver TYPE_RESOLVER
        Type resolver to find custom message processors on classpath via resource path lookup
    • Method Detail

      • lookup

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

        void process​(Message message,
                     TestContext context)
        Process message with given test context. Processors can change the message payload and headers.
        Parameters:
        message - the message to process.
        context - the current test context.
      • transform

        default Message transform​(Message message,
                                  TestContext context)
        Adapt to message transformer API.
        Specified by:
        transform in interface MessageTransformer
        Parameters:
        message - the message to process.
        context - the current test context.
        Returns: