|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.zkoss.zk.ui.event.EventQueues
public class EventQueues
Utilities to access the event queue.
The implementation of EventQueue
and even the scope
are customizable. To customize, specify the name of a class implementing
EventQueueProvider
in the library property called
"org.zkoss.zk.ui.event.EventQueueProvider.class".
For example, you can use JMS to extend the queue to be able to communicate
with applications running in different JVM.
Field Summary | |
---|---|
static java.lang.String |
APPLICATION
Represenets the event queue in the application scope. |
static java.lang.String |
DESKTOP
Represents the event queue in the desktop scope. |
static java.lang.String |
SESSION
Represenets the event queue in the sessionscope. |
Constructor Summary | |
---|---|
EventQueues()
|
Method Summary | |
---|---|
static boolean |
exists(java.lang.String name)
Tests if the specified event queue has been created in the current desktop. |
static boolean |
exists(java.lang.String name,
java.lang.String scope)
Tests if the specified event queue has been created. |
static EventQueue |
lookup(java.lang.String name)
Returns the desktop-level event queue with the specified name in the current desktop, or if no such event queue, create one. |
static EventQueue |
lookup(java.lang.String name,
boolean autoCreate)
Returns the desktop-level event queue with the specified name in the current desktop. |
static EventQueue |
lookup(java.lang.String name,
java.lang.String scope,
boolean autoCreate)
Returns the event queue with the specified name in the specified scope. |
static boolean |
remove(java.lang.String name)
Removes the event queue. |
static boolean |
remove(java.lang.String name,
java.lang.String scope)
Removes the event queue of the specified scope |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DESKTOP
public static final java.lang.String APPLICATION
Notice that this feature requires ZK PE or EE, or you have to provide your own implementation.
public static final java.lang.String SESSION
Notice that this feature requires ZK PE or EE, or you have to provide your own implementation.
Constructor Detail |
---|
public EventQueues()
Method Detail |
---|
public static EventQueue lookup(java.lang.String name, java.lang.String scope, boolean autoCreate)
There are two kinds of event scopes: DESKTOP
and
APPLICATION
.
If the desktop scope is selected, the event queue is associated
with the desktop of the current execution.
And, the event queue is gone if the desktop is removed,
or removed manually by remove(java.lang.String)
.
If the application scope is selected, the event queue is
associated with the application, and remains until the application
stops or removed manually by remove(java.lang.String)
.
When an execution subscribes an event queue, the server push
is enabled automatically.
Note:
Executions.getCurrent()
not null.
name
- the queue name.scope
- the scope fo the event queue. Currently,
it supports DESKTOP
and APPLICATION
.autoCreate
- whether to create the event queue if not found.
java.lang.IllegalStateException
- if not in an activated execution
java.lang.UnsupportedOperationException
- if the scope is not supportedpublic static EventQueue lookup(java.lang.String name, boolean autoCreate)
lookup(name, DESKTOP, autoCreate)
.
public static EventQueue lookup(java.lang.String name)
lookup(name, DESKTOP, true)
.
public static boolean exists(java.lang.String name, java.lang.String scope)
public static boolean exists(java.lang.String name)
exists(name, DESKTOP)
public static boolean remove(java.lang.String name)
remove(name, DESKTOP)
.
name
- the queue name.
public static boolean remove(java.lang.String name, java.lang.String scope)
name
- the queue name.scope
- the scope fo the event queue. Currently,
it supports DESKTOP
and APPLICATION
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |