In my application I create new method lookupAll(Class c) which always
return List, but now a I need cast to my implementation of service
manager. So to standardise this is good idea.

lookup("MyService[]") or lookup("MyService{}") is more like black magic.

-----Original Message-----
From: Farr, Aaron [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 02, 2004 5:57 PM
To: 'Avalon Developers List'
Subject: RE: [Proposal] Avalon Framework 4.5


> -----Original Message-----
> From: Sergey M Vladimrov [mailto:[EMAIL PROTECTED]
> Sent: Monday, August 02, 2004 10:00 AM
> To: 'Avalon Developers List'
> Subject: RE: [Proposal] Avalon Framework 4.5
> 
> Another things to add (usefull for my project only, but may be not):
> 
> ServiceManager: lookup mechanism for all implementation of specified
> class. Usage pattern:
> 
> Iterator filters =
> (List)ServiceManager.lookupAll(Filter.class).iterator;
> ...

In Phoenix there was a way to do this by doing something like:

ServiceManager.lookup("MyService[]");

Appending "[]" returned an ArrayList (if I remember correctly).
Appending
"{}" returned a Map.  

In Fortress you could do something like this by using the
ServiceSelector
method:

ServiceManager.lookup("MyServiceSelector");

In Merlin I believe the Finder Facility will allow these sorts of
lookups.

Long story short, the capability is sorta available in the existing
containers but there wasn't a uniform way to do it.  Personally, I'd
like to
see something standardized along these lines.

J. Aaron Farr
  SONY ELECTRONICS
  STP SYSTEMS
  (724) 696-7653

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to