@ThreadSafe
public class NewSessionRequestQueue
extends java.lang.Object
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(java.util.function.Predicate<RequestHandler> handlerConsumer,
Prioritizer prioritizer)
Processes all the entries in this queue.
|
boolean |
removeNewSessionRequest(RequestHandler request)
Remove a specific request
|
void |
stop() |
public void add(RequestHandler request)
request
- the RequestHandler to addpublic void processQueue(java.util.function.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()