org.apache.felix.eventadmin.impl.handler
Class CacheFilters
java.lang.Object
org.apache.felix.eventadmin.impl.handler.CacheFilters
- All Implemented Interfaces:
- Filters
public class CacheFilters
- extends Object
- implements Filters
This is an implementation of the Filters factory that uses a cache in
order to speed-up filter creation.
- Author:
- Felix Project Team
Method Summary |
Filter |
createFilter(String filter,
Filter nullFilter)
Create a filter for the given filter string or return the nullFilter in case
the string is null. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CacheFilters
public CacheFilters(CacheMap cache,
BundleContext context)
- The constructor of this factory. The cache is used to speed-up filter
creation.
- Parameters:
cache
- The cache to usecontext
- The context of the bundle used to create the Filter
objects
createFilter
public Filter createFilter(String filter,
Filter nullFilter)
throws InvalidSyntaxException
- Create a filter for the given filter string or return the nullFilter in case
the string is null.
- Specified by:
createFilter
in interface Filters
- Parameters:
filter
- The filter as a stringnullFilter
- 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:
InvalidSyntaxException
- if BundleContext.createFilter()
throws an InvalidSyntaxException- See Also:
Filters.createFilter(java.lang.String, org.osgi.framework.Filter)
Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.