Berin Loritsch wrote:
> Antti Koivunen wrote:
>>
>> Right. In a reply to Steve I actually suggested this:
>>
>>   Object lookup( String role, Object policy );
>>   Object hasService( String role, Object policy );
>>
>> which maintains the same flexibility, but doesn't limit the 
>> performance or ease of use.
> 
> 
> 
> This even works like you would expect by merging ComponentManager and
> ComponentSelector into one interface.  The last time I proposed this I
> beleive Federico had a cow.
> 
> This provides the ultimate simplicity for the simple cases (i.e. using
> a string for a hint), and the power for the complex cases (i.e. 
> multidimensional lookup with a Map).

And it also allows the use of custom 'hint' objects of arbitrary 
complexity for specific component types, while maintaining optimal 
performance (hashCode(), equals()). The hint could be a simple String 
just as well as something like java.awt.datatransfer.DataFlavor, and 
both could be used with the same ServiceManager implementation.

(: A ;)




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

Reply via email to