|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface RequestQueue
A queue of AuRequest.
There is one queue for each desktop.
Implementation Note: Unlike only of desktop members, this class must be thread-safe.
| Method Summary | |
|---|---|
void |
addRequestId(java.lang.String requestId)
Adds a request ID that uniquely identifies a request. |
boolean |
addRequests(java.util.Collection requests)
Adds a list of requests. |
java.util.Collection |
clearRequestIds()
Clears all request IDs that were added by addRequestId(java.lang.String). |
boolean |
endWithRequest()
Called when ending the processing of the request queue. |
AuRequest |
nextRequest()
Returns the next request, or null if no more request. |
void |
setInProcess()
Marks the queue to denote it is being processing. |
| Method Detail |
|---|
boolean endWithRequest()
Note: the in-process flag is cleared after the invocation. In other words, this method is designed to be called when an execution is about to de-activate.
Typical use:
Call this method after timeout (there might be pending requests).
If it returns true, the caller sends a response to ask client to
send anther request.
AuRequest nextRequest()
Note: if no more request, this queue is automatically marked a flag to denote no one is processing the queue.
The call shall invoke this method until null is returned, or timeout.
If timeout, it shall invoke endWithRequest() in a way described
in endWithRequest().
void setInProcess()
addRequests(java.util.Collection) will return true to tell the caller
is free to leave without process the pendinig requests.
boolean addRequests(java.util.Collection requests)
Note: caller might check the returned value. If false is returned,
it means the no one is processing queue, and the caller is responsible
to process all pending requests. Before processing, it shall call
setInProcess() to notify following executions free to leave.
On the other hand, if true is returned, it means the queue is
being processed by some one else, and the caller is free to leave.
void addRequestId(java.lang.String requestId)
PerformanceMeter.
requestId - the request ID (never null)java.util.Collection clearRequestIds()
addRequestId(java.lang.String).
It is usually called after calling endWithRequest().
addRequestId(java.lang.String),
or null if no request ID was added.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||