avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gerhard Froehlich" <gerhard_froehl...@at.ibm.com>
Subject Points to the new ContainerManager
Date Wed, 20 Feb 2002 10:27:30 GMT
Hi Berin,
I try to understand your ContainerManager, to give
my 0.02 EURO Cents to improve it.

I just follow the red threads, how it is executed at least.

ContainerManager returns a Container Object by calling the
getContainer() method. You return a Object and not ContainerObject,
 therefor we nee a extra cast here. Why don't you return just
a Object of the type Container?

The returned Container extends AbstractContainer. AbstractContainer
has initalized all components + handler in the config file and their
mappings added it into the new bucket map.

The Container returns the ComponentManager. Behind the szene
following happens. AbstractContainer creates a ContainerComponentManager,
which is a inner class in the moment. I guess it will be a real
ComponentManager
in the future, or?

The Application calls the lookup method of the returned
ContainerComponentManager,
behind the szene the ContainerComponentManager calls the get(..) method of
the
AbstractContainer, which returns a reference to the ComponentHandler which
matched with the role. It returns again a Object and we need a Cast. Why
not a
returning a Handler Object?
At least some checking happens in the lookup method of the
ContainerComponentManager
which I don't understand yet, but at the end this ComponentHandler returns
a Component.

Hmm I see so far some design improvments, please correct me if I'm wrong:
1. Think about the explicit Casts in ContainerManager and
AbstractContainer.
Are they really necessary?
2. Create a standalone ContainerComponentManager. Here I see the difficulty
to detach it from AbstractContainer (hmm just create a standalone class and
pass a reference from the AbstractContainer to it, or?)

So far so good!

  ~Gerhard


--
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