@ThreadSafe public class Registry extends Object
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 handler) |
void |
clearNewSessionRequests() |
void |
forceRelease(TestSlot testSlot,
SessionTerminationReason reason)
Releases the test slot, WITHOUT running any listener.
|
Set<TestSession> |
getActiveSessions() |
ProxySet |
getAllProxies() |
CapabilityMatcher |
getCapabilityMatcher() |
GridHubConfiguration |
getConfiguration() |
Iterable<org.openqa.selenium.remote.DesiredCapabilities> |
getDesiredCapabilities() |
TestSession |
getExistingSession(ExternalSessionKey externalKey)
gets the test existing session associated to this external key.
|
Hub |
getHub() |
int |
getNewSessionRequestCount() |
int |
getNewSessionWaitTimeout()
How long a session can remain in the newSession queue before being evicted.
|
Prioritizer |
getPrioritizer() |
RemoteProxy |
getProxyById(String id) |
TestSession |
getSession(ExternalSessionKey externalKey)
gets the test session associated to this external key.
|
List<RemoteProxy> |
getUsedProxies() |
static Registry |
newInstance() |
static Registry |
newInstance(Hub hub,
GridHubConfiguration config) |
void |
removeIfPresent(RemoteProxy proxy) |
boolean |
removeNewSessionRequest(RequestHandler request) |
void |
setHub(Hub hub) |
void |
setNewSessionWaitTimeout(int newSessionWaitTimeout) |
void |
setPrioritizer(Prioritizer prioritizer) |
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 |
stop() |
void |
terminate(TestSession session,
SessionTerminationReason reason)
Ends this test session for the hub, releasing the resources in the hub / registry.
|
public static final String KEY
public static Registry newInstance()
public static Registry newInstance(Hub hub, GridHubConfiguration config)
public GridHubConfiguration getConfiguration()
public int getNewSessionWaitTimeout()
public void setNewSessionWaitTimeout(int newSessionWaitTimeout)
public void terminate(TestSession session, SessionTerminationReason reason)
session
- The session to terminatereason
- the reason for terminationpublic void removeIfPresent(RemoteProxy proxy)
public void forceRelease(TestSlot testSlot, SessionTerminationReason reason)
public void stop()
public Hub getHub()
public void setHub(Hub hub)
public void addNewSessionRequest(RequestHandler handler)
public void add(RemoteProxy proxy)
proxy
- The proxy to addpublic void setThrowOnCapabilityNotPresent(boolean throwOnCapabilityNotPresent)
throwOnCapabilityNotPresent
- true to throw if capability not presentpublic ProxySet getAllProxies()
public List<RemoteProxy> getUsedProxies()
public TestSession getSession(ExternalSessionKey externalKey)
externalKey
- the external session keypublic TestSession getExistingSession(ExternalSessionKey externalKey)
externalKey
- the external session keypublic int getNewSessionRequestCount()
public void clearNewSessionRequests()
public boolean removeNewSessionRequest(RequestHandler request)
public Iterable<org.openqa.selenium.remote.DesiredCapabilities> getDesiredCapabilities()
public Set<TestSession> getActiveSessions()
public void setPrioritizer(Prioritizer prioritizer)
public Prioritizer getPrioritizer()
public RemoteProxy getProxyById(String id)
public CapabilityMatcher getCapabilityMatcher()
Copyright © 2013. All rights reserved.