The Filter interface is defined to be a RFC 1960 LDAP filter. To extend 
the filter language is a difficult proposition. The filter is described as 
a String and is difficult to version like a Java package or bundle. We 
have discussed extending the filter language but always bumped up against 
this versioning issue.

In any case, if you are willing to write a Filter which does complex 
selection, you can also write some code which does complex selection upon 
the result of getServiceReferences :-)
-- 

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





From:   Martin Petzold <[email protected]>
To:     OSGi Developer Mail List <[email protected]>
Date:   2011/01/11 09:14
Subject:        Re: [osgi-dev] Filter matching local and remote services
Sent by:        [email protected]



Am 11.01.2011 14:59, schrieb Martin Petzold: 
Am 11.01.2011 14:15, schrieb BJ Hargrave:
[...]
> 
> 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. 

Okay thanks, thought I had to do this. But I think this is quite 
uncomfortable from users point of view. Perhaps there should be some 
additional filtering possibilities for this in the future (next RS 
specs?).
Nice would be a getServiceReferences(String clazz, Filter filter) with a 
generic Filter interface, so this can be handled flexible. One of them 
then would be LDAP._______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to