> with no filter, just the class name of an Interface I get all local
> services, right?
I assume we are talking about the getServiceReferences(String clazz,
String filter) method here.
getServiceReferences("com.foo.Service",null) will return all registered
com.foo.Service service which are class compatible with the caller.
> With a filter setting (service.imported=*) I get all
> remote services, right?
getServiceReferences(null, "(service.imported=*)") will return all
registered services which have the service.imported property set to any
value.
>
> I would like to have a filter which matches all local services of an
> Interface AND all remote services of this Interface. BUT if the local
> service is also a remote service (service provider in the same OSGi
> framework) I don't want this to be duplicate (in this case I would like
> to have the local one only). I can't figure it out at the moment, is
> this possible?
>
This is probably more that an ldap filter can handle. You will have to ask
for more than you want and then use some code to do a second pass to
discard the duplicates.
> Thanks!
>
> Martin
--
BJ Hargrave
Senior Technical Staff Member, IBM
OSGi Fellow and CTO of the OSGi Alliance
[email protected]
office: +1 386 848 1781
mobile: +1 386 848 3788
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev