|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openqa.grid.internal.TestSlot
public class TestSlot
The entity on a proxy that can host a test session. A test slot has only 1 desired capabilities ( firefox or chrome for instance, but if a remoteproxy needs to support both, the remoteproxy will need 2 TestSlots ) A TestSlot can host 1 TestSession max at a time.
The listener (TestSessionListener
attached to the test session of this test slot is
thread safe. If 2 threads are trying to execute the before / after session, only 1 will be
executed.The other one will be discarded.
This class sees multiple threads but is currently sort-of protected by the lock in
Registry. Unfortunately the CleanUpThread also messes around in here, so it should
be thread safe on its own. Which probably means the lock in the registry is just
nonsense.
Constructor Summary | |
---|---|
TestSlot(RemoteProxy proxy,
java.util.Map<java.lang.String,java.lang.Object> capabilities)
|
Method Summary | |
---|---|
void |
forceRelease()
releasing the testslot, WITHOUT running any listener. |
java.util.Map<java.lang.String,java.lang.Object> |
getCapabilities()
|
HttpClientFactory |
getHttpClientFactory()
|
TestSession |
getNewSession(java.util.Map<java.lang.String,java.lang.Object> desiredCapabilities)
Try to get a new session for the test slot for the desired capability. |
RemoteProxy |
getProxy()
|
TestSession |
getSession()
get the test session currently executed on this test slot. |
void |
release()
releasing the test slot, running the afterSession listener if specified. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TestSlot(RemoteProxy proxy, java.util.Map<java.lang.String,java.lang.Object> capabilities)
Method Detail |
---|
public java.util.Map<java.lang.String,java.lang.Object> getCapabilities()
public RemoteProxy getProxy()
public TestSession getNewSession(java.util.Map<java.lang.String,java.lang.Object> desiredCapabilities)
CapabilityMatcher.matches(Map, Map)
is
invoked.
Use RemoteProxy.setCapabilityHelper(CapabilityMatcher)
on the proxy histing the test
slot to modify the definition of match
desiredCapabilities
-
public TestSession getSession()
public void forceRelease()
public void release()
public java.lang.String toString()
toString
in class java.lang.Object
public HttpClientFactory getHttpClientFactory()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |