> ...but Map does allow potentially more efficient implementations.

For efficiency:

  interface ServiceManager
  {
     Object lookup( Object key );
     boolean hasService( Object key );
     void release( Object key );
  }

IMO this provides the most efficient basic implementation and 
maximum flexibility.

Than you can specialize according to your needs.


Have fun,
Paulo Gaspar

> -----Original Message-----
> From: Antti Koivunen [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 13, 2002 10:04 PM
> To: Avalon Developers List
> Subject: Re: [VOTE] RE: ComponentManager interface
> 
> 
> 
> Stephen McConnell wrote:
> > I understand and support the concern re. mixing in the Parameter
> > object.  Personally I would prefer Map over Query. Here is my
> > understanding of what the interface would look like (all method
> > included) based on quasi "consensus" at this stage + your
> > suggested replacement of Parameters with Map.
> > 
> >   interface ServiceManager
> >   {
> >      Object lookup( final String role );
> >      Object lookup( final String role, final Map attributes );
> >      boolean hasObject( final String role );
> >      void release( Object object );
> >   }
> > 
> > Is this ok with everyone?
> 
> I can't vote, but it looks fine to me. For what it's worth, Parameters 
> would allow us to define the needed component with a single string, e.g. 
> "com.mycompany.MyComponent:myParam=value,yourParam=42", but Map does 
> allow potentially more efficient implementations.
> 
> (: Anrie ;)
> -- 
> Antti Koivunen | "Anrie" [un-ree] <[EMAIL PROTECTED]>
> ---------------------------------------------------------
> The song of life might not be a simple one,
> but there's plenty of room for improvisation.
> ---------------------------------------------------------
> 
> 
> 
> --
> To unsubscribe, e-mail:   
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


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

Reply via email to