Package org.zkoss.zkex.zul.impl
Class OperationQueue
- java.lang.Object
-
- org.zkoss.zkex.zul.impl.OperationQueue
-
public class OperationQueue extends java.lang.Object
A queue for storingOperation
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 Constructor Description OperationQueue()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addListener(OperationQueueListener listener)
Add a listener to this queueOperation
element()
Get an operation from queue, doesn't remove it.boolean
hasElement()
Check is there any operation in queue.Operation
next()
Get an operation from queue, and then remove it.void
put(Operation op)
Put an operation to queuevoid
remove()
Remove the first operation in queue if exist.void
removeListener(OperationQueueListener listener)
Remove a listener to this queue.
-
-
-
Method Detail
-
addListener
public void addListener(OperationQueueListener listener)
Add a listener to this queue
-
removeListener
public void removeListener(OperationQueueListener listener)
Remove a listener to this queue.
-
put
public void put(Operation op)
Put an operation to queue- Parameters:
op
- the operation.
-
element
public 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
public Operation 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.
-
-