java.lang.Object
com.northconcepts.datapipeline.eventbus.filter.TopicFilter
All Implemented Interfaces:
EventFilter

public class TopicFilter extends Object implements EventFilter
Matches any one of a set of topics -- topic A || topic B || topic C.
  • Field Summary

    Fields inherited from interface com.northconcepts.datapipeline.eventbus.EventFilter

    NULL
  • Constructor Summary

    Constructors
    Constructor
    Description
    TopicFilter(Object... topics)
    Creates a filter matching events whose topic equals one of the given topics.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    allow(Event<?> event, Object listener)
    Returns true to deliver the event to the given listener; called on the bus's delivery thread.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TopicFilter

      public TopicFilter(Object... topics)
      Creates a filter matching events whose topic equals one of the given topics. Every event matches when no topics are given or when any given topic is null.
  • Method Details

    • allow

      public boolean allow(Event<?> event, Object listener)
      Description copied from interface: EventFilter
      Returns true to deliver the event to the given listener; called on the bus's delivery thread.
      Specified by:
      allow in interface EventFilter