Package org.openqa.selenium.grid.node
Class Node
java.lang.Object
org.openqa.selenium.grid.node.Node
- All Implemented Interfaces:
HttpHandler
,Routable
,HasReadyState
- Direct Known Subclasses:
LocalNode
,RemoteNode
A place where individual webdriver sessions are running. Those sessions may be in-memory, or only
reachable via localhost and a network. Or they could be something else entirely.
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 . |
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract HttpResponse
downloadFile
(HttpRequest req, SessionId id) abstract void
drain()
execute
(HttpRequest req) abstract HttpResponse
getDownloadsFilesystem
(UUID uuid) abstract HealthCheck
getId()
abstract Session
getSession
(SessionId id) abstract NodeStatus
getUri()
boolean
abstract boolean
abstract boolean
isSupporting
(Capabilities capabilities) boolean
matches
(HttpRequest req) abstract Either<WebDriverException,
CreateSessionResponse> newSession
(CreateSessionRequest sessionRequest) abstract void
abstract HttpResponse
uploadFile
(HttpRequest req, SessionId id) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.openqa.selenium.status.HasReadyState
isReady
-
Field Details
-
tracer
-
draining
protected boolean draining
-
-
Constructor Details
-
Node
-
-
Method Details
-
getId
-
getUri
-
getNodeVersion
-
getOsInfo
-
newSession
public abstract Either<WebDriverException,CreateSessionResponse> newSession(CreateSessionRequest sessionRequest) -
executeWebDriverCommand
-
getSession
- Throws:
NoSuchSessionException
-
getUploadsFilesystem
- Throws:
IOException
-
getDownloadsFilesystem
- Throws:
IOException
-
uploadFile
-
downloadFile
-
stop
- Throws:
NoSuchSessionException
-
isSessionOwner
-
isSupporting
-
getStatus
-
getHealthCheck
-
getSessionTimeout
-
isDraining
public boolean isDraining() -
drain
public abstract void drain() -
matches
-
execute
- Specified by:
execute
in interfaceHttpHandler
-