public abstract class Node extends java.lang.Object implements java.util.function.Predicate<org.openqa.selenium.remote.http.HttpRequest>, CommandHandler
This class responds to the following URLs:
| Verb | URL Template | Meaning |
|---|---|---|
| POST | /se/grid/node/session | Attempts to start a new session for the given node. The posted data should be a
json-serialized Capabilities instance. Returns a serialized Session.
Subclasses of Node are expected to register the session with the
SessionMap. |
| GET | /se/grid/node/session/{sessionId} | Finds the Session identified by sessionId and returns the JSON-serialized
form. |
| DELETE | /se/grid/node/session/{sessionId} | Stops the Session identified by sessionId. It is expected that this will
also cause the session to removed from the
SessionMap. |
| GET | /se/grid/node/owner/{sessionId} | Allows the node to be queried about whether or not it owns the Session identified
by sessionId. This returns a boolean. |
| * | /session/{sessionId}/* | The request is forwarded to the Session identified by sessionId. When the
Quit command is called, the Session should remove itself from the
SessionMap. |
| Modifier and Type | Field and Description |
|---|---|
protected org.openqa.selenium.remote.tracing.DistributedTracer |
tracer |
| Modifier | Constructor and Description |
|---|---|
protected |
Node(org.openqa.selenium.remote.tracing.DistributedTracer tracer,
java.util.UUID id,
java.net.URI uri) |
| Modifier and Type | Method and Description |
|---|---|
void |
execute(org.openqa.selenium.remote.http.HttpRequest req,
org.openqa.selenium.remote.http.HttpResponse resp) |
abstract void |
executeWebDriverCommand(org.openqa.selenium.remote.http.HttpRequest req,
org.openqa.selenium.remote.http.HttpResponse resp) |
abstract HealthCheck |
getHealthCheck() |
java.util.UUID |
getId() |
abstract Session |
getSession(org.openqa.selenium.remote.SessionId id) |
abstract NodeStatus |
getStatus() |
java.net.URI |
getUri() |
protected abstract boolean |
isSessionOwner(org.openqa.selenium.remote.SessionId id) |
abstract boolean |
isSupporting(org.openqa.selenium.Capabilities capabilities) |
abstract java.util.Optional<CreateSessionResponse> |
newSession(CreateSessionRequest sessionRequest) |
abstract void |
stop(org.openqa.selenium.remote.SessionId id) |
boolean |
test(org.openqa.selenium.remote.http.HttpRequest req) |
protected Node(org.openqa.selenium.remote.tracing.DistributedTracer tracer,
java.util.UUID id,
java.net.URI uri)
public java.util.UUID getId()
public java.net.URI getUri()
public abstract java.util.Optional<CreateSessionResponse> newSession(CreateSessionRequest sessionRequest)
public abstract void executeWebDriverCommand(org.openqa.selenium.remote.http.HttpRequest req,
org.openqa.selenium.remote.http.HttpResponse resp)
public abstract Session getSession(org.openqa.selenium.remote.SessionId id) throws org.openqa.selenium.NoSuchSessionException
org.openqa.selenium.NoSuchSessionExceptionpublic abstract void stop(org.openqa.selenium.remote.SessionId id)
throws org.openqa.selenium.NoSuchSessionException
org.openqa.selenium.NoSuchSessionExceptionprotected abstract boolean isSessionOwner(org.openqa.selenium.remote.SessionId id)
public abstract boolean isSupporting(org.openqa.selenium.Capabilities capabilities)
public abstract NodeStatus getStatus()
public abstract HealthCheck getHealthCheck()
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