org.zkoss.zk.ui.event.impl
Class EventQueueProviderImpl

java.lang.Object
  extended by org.zkoss.zk.ui.event.impl.EventQueueProviderImpl
All Implemented Interfaces:
EventQueueProvider
Direct Known Subclasses:
EventQueueProviderImpl

public class EventQueueProviderImpl
extends java.lang.Object
implements EventQueueProvider

A simple implementation of EventQueueProvider.

Since:
5.0.0
Author:
tomyeh

Field Summary
protected static java.lang.String ATTR_EVENT_QUEUES
          The attribute used to store the map of event queues.
 
Constructor Summary
EventQueueProviderImpl()
           
 
Method Summary
<T extends Event>
EventQueue<T>
lookup(java.lang.String name, Session sess, boolean autoCreate)
          Returns the event queue with the specified name in the give session (i.e., the scope).
<T extends Event>
EventQueue<T>
lookup(java.lang.String name, java.lang.String scope, boolean autoCreate)
          Returns the event queue with the specified name in the specified scope.
<T extends Event>
EventQueue<T>
lookup(java.lang.String name, WebApp wapp, boolean autoCreate)
          Returns the event queue with the specified name in the give application (i.e., the scope).
 boolean remove(java.lang.String name, Session sess)
          Removes the event queue of the specified session.
 boolean remove(java.lang.String name, java.lang.String scope)
          Removes the event qeueue.
 boolean remove(java.lang.String name, WebApp wapp)
          Removes the event queue of the specified application.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ATTR_EVENT_QUEUES

protected static final java.lang.String ATTR_EVENT_QUEUES
The attribute used to store the map of event queues.

See Also:
Constant Field Values
Constructor Detail

EventQueueProviderImpl

public EventQueueProviderImpl()
Method Detail

lookup

public <T extends Event> EventQueue<T> lookup(java.lang.String name,
                                              java.lang.String scope,
                                              boolean autoCreate)
Description copied from interface: EventQueueProvider
Returns the event queue with the specified name in the specified scope.

Note:

Specified by:
lookup in interface EventQueueProvider
Parameters:
name - the name of the event queue.
scope - the scope of the event queue. It must support EventQueues.DESKTOP and EventQueues.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

lookup

public <T extends Event> EventQueue<T> lookup(java.lang.String name,
                                              Session sess,
                                              boolean autoCreate)
Description copied from interface: EventQueueProvider
Returns 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:
lookup in interface EventQueueProvider
sess - the session that the event queue is located (i.e., the scope)

lookup

public <T extends Event> EventQueue<T> lookup(java.lang.String name,
                                              WebApp wapp,
                                              boolean autoCreate)
Description copied from interface: EventQueueProvider
Returns 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:
lookup in interface EventQueueProvider
wapp - the Web application that the event queue is located (i.e., the scope)

remove

public boolean remove(java.lang.String name,
                      java.lang.String scope)
Description copied from interface: EventQueueProvider
Removes the event qeueue.

Specified by:
remove in interface EventQueueProvider
Parameters:
name - the name of the event queue.
scope - the scope of the event queue. It must support EventQueues.DESKTOP and EventQueues.APPLICATION. Developers might extend it to support other types of event queues.
Returns:
true if it is removed successfully

remove

public boolean remove(java.lang.String name,
                      Session sess)
Description copied from interface: EventQueueProvider
Removes the event queue of the specified session.

Unlike EventQueueProvider.remove(String, String), this method can be called without an activated execution.

Specified by:
remove in interface EventQueueProvider
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

public boolean remove(java.lang.String name,
                      WebApp wapp)
Description copied from interface: EventQueueProvider
Removes the event queue of the specified application.

Unlike EventQueueProvider.remove(String, String), this method can be called without an activated execution.

Specified by:
remove in interface EventQueueProvider
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


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