Package org.openhab.core.events
Class TopicPrefixEventFilter
java.lang.Object
org.openhab.core.events.TopicPrefixEventFilter
- All Implemented Interfaces:
EventFilter
The
TopicPrefixEventFilter is a default openHAB EventFilter implementation that ensures filtering
of events based on the prefix of an event topic.- Author:
- Cody Cutrer - Initial contribution
-
Constructor Summary
ConstructorsConstructorDescriptionTopicPrefixEventFilter(String topicPrefix) Constructs a new topic event filter. -
Method Summary
-
Constructor Details
-
TopicPrefixEventFilter
Constructs a new topic event filter.- Parameters:
topicPrefix- the prefix event topics must start with
-
-
Method Details
-
apply
Description copied from interface:EventFilterApply the filter on an event.This method is called for each subscribed
Eventof anEventSubscriber. If the filter applies, the event will be dispatched to theEventSubscriber.receive(Event)method.- Specified by:
applyin interfaceEventFilter- Parameters:
event- the event (not null)- Returns:
- true if the filter criterion applies
-