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

All Known Implementing Classes:
BaseProxySubscriber

public interface VetoEventListener<T>

Interface for classes that can veto class-based event publication from the EventService.


Method Summary
 boolean shouldVeto(T event)
          Determine whether an event should be vetoed or published.
 

Method Detail

shouldVeto

boolean shouldVeto(T event)
Determine whether an event should be vetoed or published.

The EventService calls this method before class-based publication of objects. If any of the VetoEventListeners return true, then none of the subscribers for that event are called.

Prerequisite: VetoEventListener has to be subscribed with the EventService for the event object's class.

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

Parameters:
event - The event object to veto or allow to be published.
Returns:
true if the event should be vetoed and not published, false if the event should be published.


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