Results 1 to 4 of 4

Thread: MethodParameterMessageMapper example?

Hybrid View

  1. #1
    Join Date
    Mar 2005
    Posts
    144

    Default MethodParameterMessageMapper example?

    In general, my application contains methods that take a number of parameters rather than using a single parameter object that encapsulates the required parameters. For example:

    public DetailedOrderInfo getDetailedOrderInfo(Param1 param1, Param2 param2, Param3 param3) {...}

    Looking at the javadoc for MethodParameterMessageMapper, it looks like this class might help me avoid manually creating a message and sending it on a given channel within my method body.

    Is there an example of using the MethodParameterMessageMapper available?

  2. #2
    Join Date
    Oct 2005
    Location
    Boston, MA
    Posts
    2,840

    Default

    What version of Spring Integration are you using? We've added support for expression-language driven annotations in 2.0 (still in Milestone phase) so that you can do things like this:
    Code:
    public Account createAccount(@Payload("firstname") String f, @Payload("lastname") l, @Payload("address.city") String c) {...}
    @Header("foo") and @Headers are also available.

    Would that help?

    We're also working on a way to configure this approach in XML. Do you prefer that?

    Thanks,
    -Mark

  3. #3
    Join Date
    Mar 2005
    Posts
    144

    Default Timeline for 2.0?

    Mark,

    The expression-language driven annotations sure make things easy. Unfortunately though, I am constrained to 1.04 until you go final with 2.0. Can you speculate on what the anticipated time line might be?

  4. #4
    Join Date
    Oct 2005
    Location
    Boston, MA
    Posts
    2,840

    Default

    We're working on the final milestone now (M5), and then July will be "Release Candidate" month. Then, you can expect GA in August.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •