org.apache.felix.eventadmin.impl.handler
Interface Filters

All Known Implementing Classes:
CacheFilters

public interface Filters

The factory for Filter objects. Additionally, two null filter objects are provided that either always return true or false, respectively.

Author:
Felix Project Team

Field Summary
static org.osgi.framework.Filter FALSE_FILTER
          A null filter object that does not match any given service reference.
static org.osgi.framework.Filter TRUE_FILTER
          A null filter object that matches any given service reference.
 
Method Summary
 org.osgi.framework.Filter createFilter(java.lang.String filter, org.osgi.framework.Filter nullFilter)
          Create a filter for the given filter string or return the nullFilter in case the string is null.
 

Field Detail

TRUE_FILTER

static final org.osgi.framework.Filter TRUE_FILTER
A null filter object that matches any given service reference.


FALSE_FILTER

static final org.osgi.framework.Filter FALSE_FILTER
A null filter object that does not match any given service reference.

Method Detail

createFilter

org.osgi.framework.Filter createFilter(java.lang.String filter,
                                       org.osgi.framework.Filter nullFilter)
                                       throws org.osgi.framework.InvalidSyntaxException
Create a filter for the given filter string or return the nullFilter in case the string is null.

Parameters:
filter - The filter as a string
nullFilter - The default value to return if filter is null
Returns:
The Filter of the filter string or the nullFilter if the filter string was null
Throws:
org.osgi.framework.InvalidSyntaxException - if BundleContext.createFilter() throws an InvalidSyntaxException