avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen McConnell" <mcconn...@apache.org>
Subject RE: [VOTE] RE: ComponentManager interface
Date Thu, 14 Feb 2002 05:55:58 GMT


> -----Original Message-----
> From: Antti Koivunen [mailto:anryoshi@users.sourceforge.net]
> Sent: Thursday, 14 February, 2002 06:45
> To: Avalon Developers List
> Subject: Re: [VOTE] RE: ComponentManager interface
> 
> 
> Stephen McConnell wrote:
> <skip/>
> > 
> >   interface ServiceManager
> >   {
> >      Object lookup( final String role );
> >      Object lookup( final String role, Map policy );
> > 
> >      boolean hasService( final String role );
> >      boolean hasService( final String role, Map policy );  <-- 
> addition ?
> > 
> >      void release( Object key );
> >   }
> > 
> > The addition of hasXxxxx( key, policy ) ensures that your not going 
> > on a blind date.
> 
> I agree, it's more consistent and required for something like:
> 
>    map.put("mime-type", "video/mpeg");
>    boolean ok = sm.hasService(Codec.ROLE, map);
> 
> There are many other cases where the policy/hint would just be a simple 
> string. As the use of a Map has some performance implications, I might 
> consider adding also:
> 
>    Object lookup( String role, String hint );
>    boolean hasService( String role, String hint );
> 
> The hint could be something simple, such as a mime-type, protocol or 
> URL, but it would also allow the use of string queries, if necessary.
> 
> What do you think?

Ummmm,... I'd like to avoid the additional methods if possible.  The 
fundamently attractive thing about the whole of the Avalon Framework
is this amazing combination of simplicity and functionality. Maybe I'm
being over-sensertive but I'm very aware of the fact that we are have 
already almost doubled the number of operations relative to CM - which 
leaves me with the question - can you do without it?

Cheers, Steve.

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

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