Package org.zkoss.zk.ui.event.impl
Class EventQueueProviderImpl
java.lang.Object
org.zkoss.zk.ui.event.impl.EventQueueProviderImpl
- All Implemented Interfaces:
EventQueueProvider
A simple implementation of
EventQueueProvider.- Since:
- 5.0.0
- Author:
- tomyeh
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final StringThe attribute used to store the map of event queues. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T extends Event>
EventQueue<T>Returns the event queue with the specified name in the specified scope.<T extends Event>
EventQueue<T>Returns the event queue with the specified name in the give session (i.e., the scope).<T extends Event>
EventQueue<T>Returns the event queue with the specified name in the give application (i.e., the scope).booleanRemoves the event queue.booleanRemoves the event queue of the specified session.booleanRemoves the event queue of the specified application.
-
Field Details
-
ATTR_EVENT_QUEUES
The attribute used to store the map of event queues.- See Also:
-
-
Constructor Details
-
EventQueueProviderImpl
public EventQueueProviderImpl()
-
-
Method Details
-
lookup
Description copied from interface:EventQueueProviderReturns the event queue with the specified name in the specified scope.Note:
- This method can be called only in an activated execution,
i.e.,
Executions.getCurrent()not null. - By default,
EventQueueProviderImplis used. To customize it, refer toEventQueues.
- Specified by:
lookupin interfaceEventQueueProvider- Parameters:
name- the name of the event queue.scope- the scope of the event queue. It must supportEventQueues.DESKTOPandEventQueues.APPLICATION. Developers might extend it to support other types of event queues.autoCreate- whether to create the event queue if not found.- Returns:
- the event queue with the associated name, or null if not found and autoCreate is false
- This method can be called only in an activated execution,
i.e.,
-
lookup
Description copied from interface:EventQueueProviderReturns the event queue with the specified name in the give session (i.e., the scope).Unlike
EventQueueProvider.lookup(String, String, boolean), this method can be called without an activated execution.- Specified by:
lookupin interfaceEventQueueProvidersess- the session that the event queue is located (i.e., the scope)
-
lookup
Description copied from interface:EventQueueProviderReturns the event queue with the specified name in the give application (i.e., the scope).Unlike
EventQueueProvider.lookup(String, String, boolean), this method can be called without an activated execution.- Specified by:
lookupin interfaceEventQueueProviderwapp- the Web application that the event queue is located (i.e., the scope)
-
remove
Description copied from interface:EventQueueProviderRemoves the event queue.- Specified by:
removein interfaceEventQueueProvider- Parameters:
name- the name of the event queue.scope- the scope of the event queue. It must supportEventQueues.DESKTOPandEventQueues.APPLICATION. Developers might extend it to support other types of event queues.- Returns:
- true if it is removed successfully
-
remove
Description copied from interface:EventQueueProviderRemoves the event queue of the specified session.Unlike
EventQueueProvider.remove(String, String), this method can be called without an activated execution.- Specified by:
removein interfaceEventQueueProvider- Parameters:
name- the queue name.sess- the session that the event queue is located (i.e., the session scope)- Returns:
- true if it is removed successfully
-
remove
Description copied from interface:EventQueueProviderRemoves the event queue of the specified application.Unlike
EventQueueProvider.remove(String, String), this method can be called without an activated execution.- Specified by:
removein interfaceEventQueueProvider- Parameters:
name- the queue name.wapp- the Web application that the event queue is located (i.e., the application scope)- Returns:
- true if it is removed successfully
-