Package org.zkoss.zkex.zul.impl
Class OperationQueue
java.lang.Object
org.zkoss.zkex.zul.impl.OperationQueue
A queue for storing
Operation and is thread-safe.
This class is for model sharer developer only, you rarely need to use this class.Available in ZK PE and ZK EE.
- Since:
- 3.0.0
- Author:
- Dennis.Chen
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(OperationQueueListener listener) Add a listener to this queueelement()Get an operation from queue, doesn't remove it.booleanCheck is there any operation in queue.next()Get an operation from queue, and then remove it.voidPut an operation to queuevoidremove()Remove the first operation in queue if exist.voidremoveListener(OperationQueueListener listener) Remove a listener to this queue.
-
Constructor Details
-
OperationQueue
public OperationQueue()
-
-
Method Details
-
addListener
Add a listener to this queue -
removeListener
Remove a listener to this queue. -
put
Put an operation to queue- Parameters:
op- the operation.
-
element
Get an operation from queue, doesn't remove it.- Returns:
- the first operation in queue, null if not such operation.
-
hasElement
public boolean hasElement()Check is there any operation in queue.- Returns:
- true if there exist any operation in queue.
-
next
Get an operation from queue, and then remove it.- Returns:
- the first operation in queue, null if not such operation.
-
remove
public void remove()Remove the first operation in queue if exist.
-