Package org.zkoss.zk.ui.impl
Class RequestQueueImpl
- java.lang.Object
-
- org.zkoss.zk.ui.impl.RequestQueueImpl
-
- All Implemented Interfaces:
RequestQueue
public class RequestQueueImpl extends java.lang.Object implements RequestQueue
An implementation ofRequestQueuebehaving as a queue ofAuRequest. There is one queue for each desktop.Implementation Note: Unlike only of desktop members, this class must be thread-safe.
- Author:
- tomyeh
-
-
Constructor Summary
Constructors Constructor Description RequestQueueImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPerfRequestId(java.lang.String requestId)Adds a request ID that uniquely identifies a request for performance measurementPerformanceMeter.voidaddRequests(java.util.Collection<AuRequest> requests)Adds a list of requests to the queue.java.util.Collection<java.lang.String>clearPerfRequestIds()Clears all request IDs that were added byRequestQueue.addPerfRequestId(java.lang.String)for performance measurement.booleanisEmpty()Returns if no more request available in the queue.AuRequestnextRequest()Returns the next request, or null if no more request.
-
-
-
Method Detail
-
addPerfRequestId
public void addPerfRequestId(java.lang.String requestId)
Description copied from interface:RequestQueueAdds a request ID that uniquely identifies a request for performance measurementPerformanceMeter.- Specified by:
addPerfRequestIdin interfaceRequestQueue- Parameters:
requestId- the request ID (never null)
-
clearPerfRequestIds
public java.util.Collection<java.lang.String> clearPerfRequestIds()
Description copied from interface:RequestQueueClears all request IDs that were added byRequestQueue.addPerfRequestId(java.lang.String)for performance measurement. It is usually called after all requests are processed (RequestQueue.isEmpty()is true).- Specified by:
clearPerfRequestIdsin interfaceRequestQueue- Returns:
- a list of request IDs that were added by
RequestQueue.addPerfRequestId(java.lang.String), or null if no request ID was added.
-
isEmpty
public boolean isEmpty()
Description copied from interface:RequestQueueReturns if no more request available in the queue.- Specified by:
isEmptyin interfaceRequestQueue- Returns:
- whether no more request is available in the queue.
-
nextRequest
public AuRequest nextRequest()
Description copied from interface:RequestQueueReturns the next request, or null if no more request. Once returned, the request is removed from the queue.- Specified by:
nextRequestin interfaceRequestQueue
-
addRequests
public void addRequests(java.util.Collection<AuRequest> requests)
Description copied from interface:RequestQueueAdds a list of requests to the queue. Notice that when the request is added, it will be activated first, i.e.,AuRequest.activate()will be called before adding to queue. If the component is not found or does not belong to the current execution, it will be ignored.- Specified by:
addRequestsin interfaceRequestQueue
-
-