Results 1 to 4 of 4

Thread: Method chain

  1. #1

    Question Method chain

    Hi, I'm new to Spring.

    Is there any simple way to define a list of methods (of different classes and implementing common interface) and execute them sequentially by the framework?

  2. #2
    Join Date
    Feb 2006
    Location
    Arlington, VA, USA
    Posts
    194

    Default

    It might be more helpful if you give a sample of what you're looking for; your question seems too vague.

  3. #3

    Default Sample

    Say I have two classes:

    class Apple() implements Fruit
    public void cut(){}

    class Orange() implements Fruit
    public void cut(){}

    And I want a framework to execute them sequentailly by referring to a config file like:

    <execute method = 'cut'>
    <class> Apple</class>
    <class> Orange </class>
    </execute>

    Also, I would need to intercept these method calls.

  4. #4
    Join Date
    Mar 2007
    Posts
    515

    Default

    And what is the trigger of the execution (when those methods to be executed) ? Have you thought using Quartz ? http://static.springframework.org/sp...eduling-quartz

Posting Permissions

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