How to design a auto-route Command?

From: Steven Woody (steven_at_steven4u.net)
Date: 10/26/03


Date: Sun, 26 Oct 2003 22:40:28 +0800


The blow is from Floyd Marinescu's "EJB Design Patterns":

---- cite ---
Client-Side routing logic. Usualling a framework of classes that is
responsible for taking a Command and sending it to the remote EJB
server. This routing logic is usually not visible to the client, and
is triggered by calling a command's execute() method ...
--------------

I'm thinking about designing the above 'Command' object, that means,
the execute() method of base class likely to be:

Command.execute():
        IF need_routing THEN
           find out a remote CommandExecutor object then delegate the
           execution of Command to it; (a)
        ELSE
           just return; (b)
        END

and, in the DerivedCommand.execute():
     Supper();
     do some concrete things;

In the step of (b), I think the control return to the code of derived
DerivedCommmand.execute(), that is right. But how can I preventing
the control return to the DerivedCommand.execute() after (a)?

Maybe, I'm totally wrong here, I'm just manage to find the correct
solution to design such kind of a auto-route Command object. Any
comments would be appreciated!

-- 
Steven Woody
steven@lczmsoft.com
%% (fortunes)
Q:  How did you get into artificial intelligence?
A:  Seemed logical -- I didn't have any real intelligence.


Relevant Pages

  • Re: More beginner help needed
    ... But the design decision lies in what to accomplish, ... >> not in how to pronounce the command once you have decided. ... >> They have the same semantic choices available to them as I do. ... don't hallucinate. ...
    (comp.os.linux.misc)
  • Re: Library Design, f0dders nightmare.
    ... Lousy code design is imposing ... avoid a buffer limitation and the claim of being a general purpose ... Yes but you can tell the difference of imposing an ancient architecture ... many applications can simply do teir command line ...
    (alt.lang.asm)
  • Re: Ping Kevin Aylward - re your "scientific paper"
    ... > Religious and political views contrary to your own, a poor command of ... I do not have a "poor" command of the English language in the slightest. ... Waveform Display, FFT's and Filter Design. ...
    (sci.electronics.design)
  • Re: How to handle concurrency issue with better performance?
    ... Collisions occur because your design permits ... We all work with relational database designs and more ... Hitchhiker's Guide to Visual Studio and SQL Server ... select command). ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Decent 49G/50G Guide for new HP User?
    ... to the most useless key I could find: ... designed into the HP48 series ... a variable named 'CST' or by using the MENU command, ... which does the storing for you); with careful menu design, ...
    (comp.sys.hp48)