avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen McConnell" <mcconn...@apache.org>
Subject RE: ComponentManager interface
Date Sun, 10 Feb 2002 18:01:45 GMT

James:

James Pepe wrote:
> First off, I'd like to say hello to everyone, as I am new to this 
> list, and new to the Avalon project so forgive me if I make any undue 
> assumptions.  I love the work so far, and am here to (hopefully) make 
> some worthwhile contributions, and get a jump on the upcoming releases.

Welcome to Avalon!

> To solve the "Object" problem ... Why not add an "ObjectManager" 
> interface that uses the "resolve()" idea from earlier?  Whereas the 
> new RI class would be called ExcaliburObjectManager and extend 
> ExcaliburComponentManager implementing the ObjectManager interface.
> 
> e.g.:
> ExcaliburObjectManager manager;
> /* horrendous code here */
> Object o = manager.resolve(thisObject);
> Component c = manager.lookup(thisComponentPleaseKindSir);
> 
> Not sure what its implications are to the project.  Thoughts?

To do this you need to handle different treatment for operations such
as hasComponent (only returns true if the manger has a object and the 
object is an instance of Component).  In the above example you could 
get the same object returned from both resolve and lookup (because the 
objet registered with the manager implements Component).  This gets 
messy in the implementation of DefaultComponentManger when dealing with
non-null parent ComponentManagers.  This is part of what I was 
referring to my earlier email to Paul and the reference to Ministrone!

Cheers, Steve.




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


Mime
View raw message