Class SessionMap
java.lang.Object
org.openqa.selenium.grid.sessionmap.SessionMap
- All Implemented Interfaces:
org.openqa.selenium.remote.http.HttpHandler
,org.openqa.selenium.remote.http.Routable
,HasReadyState
- Direct Known Subclasses:
LocalSessionMap
,NullSessionMap
,RemoteSessionMap
public abstract class SessionMap
extends Object
implements HasReadyState, org.openqa.selenium.remote.http.Routable
Provides a stable API for looking up where on the Grid a particular webdriver instance is
running.
This class responds to the following URLs:
Verb | URL Template | Meaning |
---|---|---|
DELETE | /se/grid/session/{sessionId} | Removes a URI from the session map. Calling this method more than once for the same
SessionId will not throw an error. |
GET | /se/grid/session/{sessionId} | Retrieves the URI associated the SessionId , or throws a
NoSuchSessionException should the session not be present. |
POST | /se/grid/session/{sessionId} | Registers the session with session map. In theory, the session map never expires a session from its mappings, but realistically, sessions may end up being removed for many reasons. |
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.openqa.selenium.remote.tracing.Tracer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract boolean
org.openqa.selenium.remote.http.HttpResponse
execute
(org.openqa.selenium.remote.http.HttpRequest req) abstract Session
get
(org.openqa.selenium.remote.SessionId id) getUri
(org.openqa.selenium.remote.SessionId id) boolean
matches
(org.openqa.selenium.remote.http.HttpRequest req) abstract void
remove
(org.openqa.selenium.remote.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
Methods inherited from interface org.openqa.selenium.remote.http.Routable
with
-
Field Details
-
tracer
protected final org.openqa.selenium.remote.tracing.Tracer tracer
-
-
Constructor Details
-
SessionMap
public SessionMap(org.openqa.selenium.remote.tracing.Tracer tracer)
-
-
Method Details
-
add
-
get
public abstract Session get(org.openqa.selenium.remote.SessionId id) throws org.openqa.selenium.NoSuchSessionException - Throws:
org.openqa.selenium.NoSuchSessionException
-
remove
public abstract void remove(org.openqa.selenium.remote.SessionId id) -
getUri
public URI getUri(org.openqa.selenium.remote.SessionId id) throws org.openqa.selenium.NoSuchSessionException - Throws:
org.openqa.selenium.NoSuchSessionException
-
matches
public boolean matches(org.openqa.selenium.remote.http.HttpRequest req) - Specified by:
matches
in interfaceorg.openqa.selenium.remote.http.Routable
-
execute
public org.openqa.selenium.remote.http.HttpResponse execute(org.openqa.selenium.remote.http.HttpRequest req) - Specified by:
execute
in interfaceorg.openqa.selenium.remote.http.HttpHandler
-