users@glassfish.java.net

Re: HK2: How to get a list of instances that implement a service

From: David Van Couvering <David.Vancouvering_at_Sun.COM>
Date: Wed, 20 Aug 2008 12:37:40 -0700

Oh, cool, thanks.

David

Jerome Dochez wrote:
> David Van Couvering wrote:
>> Thanks, Jerome. I saw reference to Habitat, but I couldn't find much
>> Javadoc on it or any examples I could use as a template. Is there a
>> working example you can point me to?
> it's all over V3 code base, for instance you can look at
> ListCommandsCommand.java in core/kernel module. it lists all avalaible
> commands.
>
> jerome
>
>>
>> David
>>
>> Jerome Dochez wrote:
>>> David Van Couvering wrote:
>>>> I sent this to the HK2 user list but it seems kind of quiet over
>>>> there, so I'm resending here:
>>>>
>>>> Hi, all. I would like to get all instances that implement a given
>>>> service. How do I do this?
>>>> The Javadoc refers to a ServiceLookup
>>>>
>>>> https://hk2.dev.java.net/nonav/hk2/apidocs/com/sun/enterprise/module/ServiceLookup.html
>>>>
>>>>
>>>> but I can't find this in the code repository nor can I find out how
>>>> I gain access to an instance of ServiceLookup.
>>> the easiest is to use the habitat.
>>>
>>> habitat.getAllByContract(Class<T> contract).
>>>
>>> jerome
>>>
>>>>
>>>> Thanks,
>>>>
>>>> David
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>>>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>