Spring Integration
  1. Spring Integration
  2. INT-6

Define base classes for Message transformation

    Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.0 M5
    • Component/s: Core
    • Labels:
      None

      Description

      Message transformation base classes should include a payload transformer and a property enricher.

        Activity

        Hide
        Mark Fisher added a comment -

        Since transformer are often concerned with enrichment/filtering of particular values in the MessageHeader, we also should consider more fine-grained annotations (including parameter-level) for binding from the Message to method arguments. This will be consistent with the annotations used in Spring 2.5+ MVC.

        For example, something along these lines (just the general idea)... setting a value from a header:

        @Transformer
        public void addEmail(@HeaderAttribute("email") String email, Customer customer)

        { customer.addEmail(email); }

        The same basic idea can be applied for providing a value to a header - or possibly returning a Map of values to add to the header (similar to a "referenceData" returning method in Spring MVC). Obviously this example is so trivial that an expression-language based solution would be sufficient (either in XML or class-level @Transformer annotation).

        These same annotations will be useful for routers.

        Show
        Mark Fisher added a comment - Since transformer are often concerned with enrichment/filtering of particular values in the MessageHeader, we also should consider more fine-grained annotations (including parameter-level) for binding from the Message to method arguments. This will be consistent with the annotations used in Spring 2.5+ MVC. For example, something along these lines (just the general idea)... setting a value from a header: @Transformer public void addEmail(@HeaderAttribute("email") String email, Customer customer) { customer.addEmail(email); } The same basic idea can be applied for providing a value to a header - or possibly returning a Map of values to add to the header (similar to a "referenceData" returning method in Spring MVC). Obviously this example is so trivial that an expression-language based solution would be sufficient (either in XML or class-level @Transformer annotation). These same annotations will be useful for routers.
        Hide
        Mark Fisher added a comment -

        Moving message transformer work to M5.

        Show
        Mark Fisher added a comment - Moving message transformer work to M5.
        Hide
        Mark Fisher added a comment -

        The MessageTransformer interface has been defined, and an annotation-based adapter is available.

        Show
        Mark Fisher added a comment - The MessageTransformer interface has been defined, and an annotation-based adapter is available.

          People

          • Assignee:
            Mark Fisher
            Reporter:
            Mark Fisher
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 3d
              3d
              Remaining:
              Remaining Estimate - 0d
              0d
              Logged:
              Time Spent - 3d
              3d