org.zkoss.zkmax.ui.eq
Interface EventQueue


public interface EventQueue

An event queue. An event queue is a many-to-many 'channel' to publish events and to subscribe listeners.

Since:
3.5.0
Author:
tomyeh

Method Summary
 void publish(Event event)
          Publishes an event the queue.
 void subscribe(EventListener listener)
          Subscribes a listener to queue.
 boolean unsubscribe(EventListener listener)
          Unsubscribes a listener from the queue.
 

Method Detail

publish

void publish(Event event)
Publishes an event the queue.

Note: this method must be called within an activated exection, i.e., Executions.getCurrent() not null.

Throws:
java.lang.IllegalStateException - if this method is called not within an activated execution (such as a working thread).

subscribe

void subscribe(EventListener listener)
Subscribes a listener to queue.

Note: this method must be called within an activated exection, i.e., Executions.getCurrent() not null.


unsubscribe

boolean unsubscribe(EventListener listener)
Unsubscribes a listener from the queue.

Note: this method must be called within an activated exection, i.e., Executions.getCurrent() not null.

Returns:
true if the listener was subscribed.


Copyright © 2005-2009 Potix Corporation. All Rights Reserved. SourceForge.net Logo