public abstract class Distributor extends java.lang.Object implements java.util.function.Predicate<org.openqa.selenium.remote.http.HttpRequest>, CommandHandler
Nodes on which Sessions run
are determined.
This class responds to the following URLs:
| Verb | URL Template | Meaning |
|---|---|---|
| POST | /session | This is exactly the same as the New Session command from the WebDriver spec. |
| POST | /se/grid/distributor/node | Adds a new Node to this distributor. Please read the javadocs for Node for
how the Node should be serialized. |
| DELETE | /se/grid/distributor/node/{nodeId} | Remove the Node identified by nodeId from this distributor. It is expected
that any sessions running on the Node are allowed to complete: this simply means that no new
sessions will be scheduled on this Node. |
| Modifier | Constructor and Description |
|---|---|
protected |
Distributor(org.openqa.selenium.remote.tracing.DistributedTracer tracer,
org.openqa.selenium.remote.http.HttpClient.Factory httpClientFactory) |
| Modifier and Type | Method and Description |
|---|---|
abstract Distributor |
add(Node node) |
void |
execute(org.openqa.selenium.remote.http.HttpRequest req,
org.openqa.selenium.remote.http.HttpResponse resp) |
abstract DistributorStatus |
getStatus() |
abstract CreateSessionResponse |
newSession(org.openqa.selenium.remote.http.HttpRequest request) |
abstract void |
remove(java.util.UUID nodeId) |
boolean |
test(org.openqa.selenium.remote.http.HttpRequest req) |
protected Distributor(org.openqa.selenium.remote.tracing.DistributedTracer tracer,
org.openqa.selenium.remote.http.HttpClient.Factory httpClientFactory)
public abstract CreateSessionResponse newSession(org.openqa.selenium.remote.http.HttpRequest request) throws org.openqa.selenium.SessionNotCreatedException
org.openqa.selenium.SessionNotCreatedExceptionpublic abstract Distributor add(Node node)
public abstract void remove(java.util.UUID nodeId)
public abstract DistributorStatus getStatus()
public boolean test(org.openqa.selenium.remote.http.HttpRequest req)
test in interface java.util.function.Predicate<org.openqa.selenium.remote.http.HttpRequest>public void execute(org.openqa.selenium.remote.http.HttpRequest req,
org.openqa.selenium.remote.http.HttpResponse resp)
throws java.io.IOException
execute in interface CommandHandlerjava.io.IOException