public interface GridRegistry
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
KEY |
Modifier and Type | Method and Description |
---|---|
void |
add(RemoteProxy proxy)
Add a proxy to the list of proxy available for the grid to managed and link the proxy to the
registry.
|
void |
addNewSessionRequest(RequestHandler requestHandler)
Add a new session request to the registry
|
void |
clearNewSessionRequests()
Clear all new session requests in the registry
|
void |
forceRelease(TestSlot testSlot,
SessionTerminationReason reason)
Releases the test slot, WITHOUT running any listener.
|
java.util.Set<TestSession> |
getActiveSessions() |
ProxySet |
getAllProxies() |
java.lang.Iterable<org.openqa.selenium.remote.DesiredCapabilities> |
getDesiredCapabilities() |
TestSession |
getExistingSession(ExternalSessionKey externalKey)
gets the test existing session associated to this external key.
|
org.openqa.selenium.remote.http.HttpClient |
getHttpClient(java.net.URL url) |
Hub |
getHub() |
int |
getNewSessionRequestCount() |
RemoteProxy |
getProxyById(java.lang.String id)
Get the
RemoteProxy using the id provided |
TestSession |
getSession(ExternalSessionKey externalKey)
Gets the test session associated to this external key.
|
java.util.List<RemoteProxy> |
getUsedProxies() |
void |
removeIfPresent(RemoteProxy proxy)
Remove the
RemoteProxy specified from the registry |
boolean |
removeNewSessionRequest(RequestHandler requestHandler)
Remove a new session request from the registry
|
void |
setHub(Hub hub)
Set the
Hub for this registry |
void |
setThrowOnCapabilityNotPresent(boolean throwOnCapabilityNotPresent)
If throwOnCapabilityNotPresent is set to true, the hub will reject test request for a
capability that is not on the grid.
|
void |
start()
Start the registry
|
void |
stop()
Stop the registry
|
void |
terminate(TestSession session,
SessionTerminationReason reason)
Ends this test session, releasing the resources in the registry.
|
void terminate(TestSession session, SessionTerminationReason reason)
TestSlot
which
is being released.session
- The session to terminatereason
- the reason for terminationvoid removeIfPresent(RemoteProxy proxy)
RemoteProxy
specified from the registryproxy
- void forceRelease(TestSlot testSlot, SessionTerminationReason reason)
testSlot
- test slot to be releasedreason
- reason for terminationvoid addNewSessionRequest(RequestHandler requestHandler)
requestHandler
- the RequestHandler
void add(RemoteProxy proxy)
proxy
- The proxy to addvoid setThrowOnCapabilityNotPresent(boolean throwOnCapabilityNotPresent)
If set to false, the test will be queued hoping a new proxy will register later offering that capability.
throwOnCapabilityNotPresent
- true to throw if capability not presentjava.util.List<RemoteProxy> getUsedProxies()
List
of all of the proxies/nodes which are in useTestSession getSession(ExternalSessionKey externalKey)
externalKey
- the external session keyTestSession getExistingSession(ExternalSessionKey externalKey)
externalKey
- the external session keyint getNewSessionRequestCount()
void start()
java.lang.Iterable<org.openqa.selenium.remote.DesiredCapabilities> getDesiredCapabilities()
DesiredCapabilities
in the new session queuejava.util.Set<TestSession> getActiveSessions()
Set
of active TestSession
sRemoteProxy getProxyById(java.lang.String id)
RemoteProxy
using the id providedid
- the string identifierRemoteProxy
void stop()
org.openqa.selenium.remote.http.HttpClient getHttpClient(java.net.URL url)
HttpClient.Factory
to use.boolean removeNewSessionRequest(RequestHandler requestHandler)
requestHandler
- the RequestHandler
void clearNewSessionRequests()