commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jack, Paul" <pj...@sfaf.org>
Subject RE: [VOTE] [daemon] Moving to commons proper
Date Wed, 14 Aug 2002 23:24:31 GMT

> > What I imagine is the user of the Daemon API either using 
> an implementation
> > supplied by us, or one they write themselves. 
> 
> What I imagine is that I use Daemon to launch and manage my daemons.
> If I wanted another implementation, I wouldn't use Daemon at all.

Just to add another POV here, I personally don't see why the two 
strategies (introspection vs. explicit interface) can't live peacefully
together.

Ie, have a default implementation of the interface that dynamically
instantiates a given class, uses reflection to find the methods
init, start, stop whatever, and the implementation of the 
interface methods uses those discovered Method objects to invoke
them. 

Such a beast could also let users specify the names of the methods,
making it available to vastly more people whose components might
use "initialise" instead of "init".  

Alternatively, if somebody want to implement the interface directly,
for whatever reason, perhaps to provide an adapter class that 
invokes package-protected init methods, whatever, they could do that
too. 

Apply both strategies, more users benefit, IMO.

-Paul


--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message