concept filter in category osgi

appears as: Filters, filter, filters
Enterprise OSGi in Action

This is an excerpt from Manning's book Enterprise OSGi in Action.

Services can be looked up using the interface name, or extra criteria can be specified. These extra criteria are set using OSGi service filters. The filter syntax is based on LDAP syntax. It can take a bit of getting used to all the ampersands and parentheses, but filters are actually straightforward. If you’d like to brush up on the finer points of filters, we’ve got more examples in appendix A.

The most important thing to remember about filters is that they’re directly related to service properties; if it can be set using a service property, it can be queried using a filter. This means service lookups can be general—“give me anything that implements this interface”—or very, very specific—“give me a service with this interface that also has this property set to that value but also doesn’t have this other property set to some other value.”