How to design a auto-route Command?
From: Steven Woody (steven_at_steven4u.net)
Date: 10/26/03
- Next message: Dave Harris: "Re: Visitor, dynamic_cast or ..."
- Previous message: Topmind: "Re: Basic books on OOA&D"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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.
- Next message: Dave Harris: "Re: Visitor, dynamic_cast or ..."
- Previous message: Topmind: "Re: Basic books on OOA&D"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|