Niclas Hedhman wrote:
> Gang (read Rickard),
> 
> there are big visibility problems, that we need to address asap.
> 
> There are several places where we have methods that returns the
> Composite meta data, whether that be getCompositeBindings() or
> lookupServices(), where it is very unclear who is responsible for
> providing the visibility rules. IMHO, we should have a separation of
> calls to the various ModuleXyz classes between "give me what you have"
> and "give me what you can see". For instance;
> 
> ModuleBinding.getCompositeBindings()  -->  Returns the composite
> bindings held by the module.
> 
> ModuleBinding.findCompositeBindings() --> Return all composites that
> the Module can see.
> 
> And do this for ModuleBinding, ModuleContext and ModuleInstance, and
> possibly other places.
> 
> 
> Right now, there is a mish-mash of code everywhere handling the
> visibility rules, and even clients will at the moment need to code
> around this as well.

I agree that this is a complete mess, and needs to be fixed up. I agree 
that the names suggested is a good way to do it (get vs find), and maybe 
we should extend this so that the current ServiceLocator is renamed to 
ServiceFinder and then have findService/findServices rather than 
lookupService/lookupServices. And *then* rename EntityFinder.find to 
findEntities and add findEntity (single), and it should be reasonably 
symmetric and semantically well-defined.

Makes sense?

/Rickard


_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to