org.bushe.swing.event
Interface VetoTopicEventListener<T>

All Known Implementing Classes:
ProxyTopicPatternSubscriber, ProxyTopicSubscriber

public interface VetoTopicEventListener<T>

Interface for classes that can veto publication on topic names from the EventService.


Method Summary
 boolean shouldVeto(String topic, T data)
          Determine whether a topic publication should be vetoed or allowed.
 

Method Detail

shouldVeto

boolean shouldVeto(String topic,
                   T data)
Determine whether a topic publication should be vetoed or allowed.

The EventService calls this method before publication of on a topic name. If any of the VetoTopicEventListeners return true, then none of the subscribers to that topic are called.

Prerequisite: VetoTopicEventListener has to be subscribed with the EventService for the topic name.

Guaranteed to be called in the SwingEventThread when using the SwingEventService (EventBus). See EventService

Parameters:
topic - The topic name the data object is published on.
data - The data object being published on the topic.
Returns:
true if the publication on the topic should be vetoed and not published, false if the data should be published on the topic.


Copyright © 2011 Bushe Enterprises, Inc.. All Rights Reserved.