org.apache.felix.eventadmin.impl.handler
Class CacheTopicHandlerFilters

java.lang.Object
  extended by org.apache.felix.eventadmin.impl.handler.CacheTopicHandlerFilters
All Implemented Interfaces:
TopicHandlerFilters

public class CacheTopicHandlerFilters
extends java.lang.Object
implements TopicHandlerFilters

The factory for EventHandler filters based on a certain topic. This implementation uses a cache to speed-up filter creation.

Author:
Felix Project Team

Constructor Summary
CacheTopicHandlerFilters(CacheMap cache, boolean requireTopic)
          The constructor of the filter factory.
 
Method Summary
 java.lang.String createFilterForTopic(java.lang.String topic)
          Create a filter that will match all EventHandler services that match the given topic.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CacheTopicHandlerFilters

public CacheTopicHandlerFilters(CacheMap cache,
                                boolean requireTopic)
The constructor of the filter factory.

Parameters:
cache - The cache to use in order to speed-up filter creation.
requireTopic - Include handlers that do not provide a topic
Method Detail

createFilterForTopic

public java.lang.String createFilterForTopic(java.lang.String topic)
Create a filter that will match all EventHandler services that match the given topic.

Specified by:
createFilterForTopic in interface TopicHandlerFilters
Parameters:
topic - The topic to match
Returns:
A filter that will match all EventHandler services for the given topic.
See Also:
TopicHandlerFilters.createFilterForTopic(java.lang.String)