Class HierachyTopicFilter

java.lang.Object
org.vaadin.spring.events.HierachyTopicFilter
All Implemented Interfaces:
TopicFilter

public class HierachyTopicFilter extends Object implements TopicFilter
An implementation of TopicFilter which validates the topics hierarchical. This means, that the listener filter will be checked as prefixed substring against the event topic.
  1. match: eventTopic = "foo.bar" and listenerTopic = "foo"
  2. no match: eventTopic = "foo" and listenerTopic = "foo.bar"
  3. no match: eventTopic = "foo.bar" and listenerTopic = "foo.not"
Author:
Marco Luthardt (marco.luthardt@iandme.net)
  • Constructor Details

    • HierachyTopicFilter

      public HierachyTopicFilter()
  • Method Details

    • validTopic

      public boolean validTopic(String eventTopic, String listenerTopic)
      Description copied from interface: TopicFilter
      Validates the given event topic against the listener topic.
      Specified by:
      validTopic in interface TopicFilter
      Parameters:
      eventTopic - the topic provided by while publishing an event, never null
      listenerTopic - the topic of the listener method, never null
      Returns:
      true true if the event topic matches the listener topic, otherwise false