|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openqa.grid.internal.RemoteProxy
public class RemoteProxy
Proxy to a remote server executing the tests.
The proxy keeps a state of what is happening on the remote server and knows if a new test can be run on the remote server. There are several reasons why a test could not be run on the specified remote server, for instance: if the RemoteProxy decides the remote server has reached the maximum number of concurrent sessions, or if the client has requested DesiredCapabilities we don't support e.g. asking for Chrome when we only support Firefox.
Field Summary | |
---|---|
protected URL |
remoteHost
|
Constructor Summary | |
---|---|
RemoteProxy(RegistrationRequest request,
Registry registry)
Create the proxy from the info sent by the remote. |
Method Summary | ||
---|---|---|
int |
compareTo(RemoteProxy o)
|
|
boolean |
equals(Object obj)
|
|
CapabilityMatcher |
getCapabilityHelper()
|
|
Map<String,Object> |
getConfig()
|
|
HtmlRenderer |
getHtmlRender()
|
|
org.openqa.selenium.remote.internal.HttpClientFactory |
getHttpClientFactory()
|
|
String |
getId()
get the unique id for the node. |
|
int |
getMaxNumberOfConcurrentTestSessions()
return the max number of tests that can run on this remote at a given time. |
|
static
|
getNewInstance(RegistrationRequest request,
Registry registry)
Takes a registration request and return the RemoteProxy associated to it. |
|
TestSession |
getNewSession(Map<String,Object> requestedCapability)
return a new test session if the current proxy has the resources and is ready to run the test. |
|
RegistrationRequest |
getOriginalRegistrationRequest()
return the registration request that created the proxy in the first place. |
|
Registry |
getRegistry()
|
|
URL |
getRemoteHost()
Get the host the node is on. |
|
org.json.JSONObject |
getStatus()
the status of the node. |
|
List<TestSlot> |
getTestSlots()
|
|
int |
getTimeOut()
im millis |
|
int |
getTotalUsed()
returns the total number of test slots used on this proxy |
|
int |
hashCode()
|
|
protected boolean |
isBusy()
|
|
void |
setCapabilityHelper(CapabilityMatcher capabilityHelper)
|
|
void |
setupTimeoutListener()
|
|
void |
teardown()
|
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected volatile URL remoteHost
Constructor Detail |
---|
public RemoteProxy(RegistrationRequest request, Registry registry)
request
- The requestregistry
- The registry to useMethod Detail |
---|
public List<TestSlot> getTestSlots()
public Registry getRegistry()
public CapabilityMatcher getCapabilityHelper()
public void setCapabilityHelper(CapabilityMatcher capabilityHelper)
public void setupTimeoutListener()
public String getId()
public void teardown()
public Map<String,Object> getConfig()
public RegistrationRequest getOriginalRegistrationRequest()
public int getMaxNumberOfConcurrentTestSessions()
public URL getRemoteHost()
public TestSession getNewSession(Map<String,Object> requestedCapability)
requestedCapability
- .
public int getTotalUsed()
protected boolean isBusy()
public static <T extends RemoteProxy> T getNewInstance(RegistrationRequest request, Registry registry)
request
- The requestregistry
- The registry to use
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
public int compareTo(RemoteProxy o)
compareTo
in interface Comparable<RemoteProxy>
public String toString()
toString
in class Object
public HtmlRenderer getHtmlRender()
public int getTimeOut()
public org.openqa.selenium.remote.internal.HttpClientFactory getHttpClientFactory()
public org.json.JSONObject getStatus() throws GridException
GridException
- If the node if down or doesn't recognize the /wd/hub/status request.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |