@ThreadSafe
class NewSessionRequestQueue
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private static java.util.logging.Logger |
log |
private java.util.List<RequestHandler> |
newSessionRequests |
| Constructor and Description |
|---|
NewSessionRequestQueue() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(RequestHandler request)
Adds a request handler to this queue.
|
void |
clearNewSessionRequests()
clear the entire list of requests
|
java.lang.Iterable<org.openqa.selenium.remote.DesiredCapabilities> |
getDesiredCapabilities()
Provides the desired capabilities of all the items in this queue.
|
int |
getNewSessionRequestCount()
Returns the number of unprocessed items in this request queue.
|
void |
processQueue(com.google.common.base.Predicate<RequestHandler> handlerConsumer,
Prioritizer prioritizer)
Processes all the entries in this queue.
|
boolean |
removeNewSessionRequest(RequestHandler request)
Remove a specific request
|
void |
stop() |
private static final java.util.logging.Logger log
private final java.util.List<RequestHandler> newSessionRequests
public void add(RequestHandler request)
request - the RequestHandler to addpublic void processQueue(com.google.common.base.Predicate<RequestHandler> handlerConsumer, Prioritizer prioritizer)
handlerConsumer - The consumer that returns true if it has taken the item from the queueprioritizer - The prioritizer to usepublic void clearNewSessionRequests()
public boolean removeNewSessionRequest(RequestHandler request)
request - The request to removepublic java.lang.Iterable<org.openqa.selenium.remote.DesiredCapabilities> getDesiredCapabilities()
public int getNewSessionRequestCount()
public void stop()