Package org.zkoss.zk.ui.impl
Class RequestQueueImpl
java.lang.Object
org.zkoss.zk.ui.impl.RequestQueueImpl
- All Implemented Interfaces:
RequestQueue
An implementation of
RequestQueue behaving as
a queue of AuRequest.
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 -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPerfRequestId(String requestId) Adds a request ID that uniquely identifies a request for performance measurementPerformanceMeter.voidaddRequests(Collection<AuRequest> requests) Adds a list of requests to the queue.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.Returns the next request, or null if no more request.
-
Constructor Details
-
RequestQueueImpl
public RequestQueueImpl()
-
-
Method Details
-
addPerfRequestId
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
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
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
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
-