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.HttpHandler
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 sameSessionId
will not throw an error.GET /se/grid/session/{sessionId} Retrieves the URI
associated theSessionId
, or throws aNoSuchSessionException
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.
-
-
Constructor Summary
Constructors Constructor Description SessionMap()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract boolean
add(Session session)
org.openqa.selenium.remote.http.HttpResponse
execute(org.openqa.selenium.remote.http.HttpRequest req)
abstract Session
get(org.openqa.selenium.remote.SessionId id)
boolean
matches(org.openqa.selenium.remote.http.HttpRequest req)
abstract void
remove(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:
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
-
-