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
ConstructorDescriptionTopicPrefixEventFilter
(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:EventFilter
Apply the filter on an event.This method is called for each subscribed
Event
of anEventSubscriber
. If the filter applies, the event will be dispatched to theEventSubscriber.receive(Event)
method.- Specified by:
apply
in interfaceEventFilter
- Parameters:
event
- the event (not null)- Returns:
- true if the filter criterion applies
-