Package org.openhab.core.events
Class TopicGlobEventFilter
java.lang.Object
org.openhab.core.events.TopicGlobEventFilter
- All Implemented Interfaces:
EventFilter
The
TopicGlobEventFilter is a default openHAB EventFilter implementation that ensures filtering
of events based on an event topic.
The syntax for the filter is the glob syntax documented at
https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/nio/file/FileSystem.html#getPathMatcher(java.lang.String)- Author:
- Cody Cutrer - Initial contribution
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
TopicGlobEventFilter
Constructs a new topic event filter.- Parameters:
topicGlob- the glob- See Also:
-
-
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
-