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
- Direct Known Subclasses:
LocalSessionMap,RemoteSessionMap
public abstract class SessionMap extends java.lang.Object implements org.openqa.selenium.remote.http.Routable, org.openqa.selenium.remote.http.HttpHandlerProvides 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 URIfrom the session map. Calling this method more than once for the sameSessionIdwill not throw an error.GET /se/grid/session/{sessionId} Retrieves the URIassociated theSessionId, or throws aNoSuchSessionExceptionshould 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
Fields Modifier and Type Field Description protected io.opentracing.Tracertracer
-
Constructor Summary
Constructors Constructor Description SessionMap(io.opentracing.Tracer tracer)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract booleanadd(Session session)org.openqa.selenium.remote.http.HttpResponseexecute(org.openqa.selenium.remote.http.HttpRequest req)abstract Sessionget(org.openqa.selenium.remote.SessionId id)booleanmatches(org.openqa.selenium.remote.http.HttpRequest req)abstract voidremove(org.openqa.selenium.remote.SessionId id)
-
-
-
Method Detail
-
add
public abstract boolean add(Session session)
-
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)
-
matches
public boolean matches(org.openqa.selenium.remote.http.HttpRequest req)
- Specified by:
matchesin interfaceorg.openqa.selenium.remote.http.Routable
-
execute
public org.openqa.selenium.remote.http.HttpResponse execute(org.openqa.selenium.remote.http.HttpRequest req)
- Specified by:
executein interfaceorg.openqa.selenium.remote.http.HttpHandler
-
-