| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openqa.grid.internal.BaseRemoteProxy
public class BaseRemoteProxy
| Field Summary | |
|---|---|
| protected  URL | remoteHost | 
| Constructor Summary | |
|---|---|
| BaseRemoteProxy(RegistrationRequest request,
                Registry registry)Create the proxy from the info sent by the remote. | |
| Method Summary | ||
|---|---|---|
|  int | compareTo(RemoteProxy o) | |
|  boolean | equals(Object obj) | |
|  void | forceSlotCleanerRun()Internal use only | |
|  CapabilityMatcher | getCapabilityHelper()Returns the capability matcher that will be used to by the remote proxy to determine whether its test slots can run a requested test session. | |
|  Map<String,Object> | getConfig()Returns the configuration the node was initialized with. | |
|  HtmlRenderer | getHtmlRender()Returns the object responsible for rendering any information about the proxy in a Web application. | |
|  org.openqa.selenium.remote.internal.HttpClientFactory | getHttpClientFactory()Retrieves the global factory for creating HTTP clients. | |
|  String | getId()Returns the unique id for the node. | |
|  int | getMaxNumberOfConcurrentTestSessions()Returns the maximum number of concurrent tests that can run on this node. | |
| static
 | getNewInstance(RegistrationRequest request,
               Registry registry)Takes a registration request and return the RemoteProxy associated to it. | |
|  TestSession | getNewSession(Map<String,Object> requestedCapability)Creates and returns a new test session if the current node has the resources and is ready to run the test. | |
|  RegistrationRequest | getOriginalRegistrationRequest()Returns the request sent from the node to the hub to register the proxy. | |
|  Registry | getRegistry()Retrieves the handle to the registry this remote proxy is registered with. | |
|  URL | getRemoteHost()Get the host the node is on. | |
|  float | getResourceUsageInPercent()Return how much resources are currently used on the proxy. | |
|  org.json.JSONObject | getStatus()Renders the status of the node as JSON. | |
|  List<TestSlot> | getTestSlots()Each test running on the node will occupy a test slot. | |
|  int | getTimeOut()Indicates how long a node should wait for a seemingly non-responsive test session before deciding it has timed out. | |
|  int | getTotalUsed()Returns the total number of test slots used on this node. | |
|  boolean | hasCapability(Map<String,Object> requestedCapability)Checks if the node has the capability requested. | |
|  int | hashCode() | |
|  boolean | isBusy()Indicates whether the node has any test slots in use. | |
|  void | setupTimeoutListener()If the RemoteProxy implementation also implements TimeoutListener, then this method will start up the thread used to monitor timeouts and handle cleanup of timed out resources. | |
|  void | teardown()If the RemoteProxy implementation also implements TimeoutListener, then this method will stop the thread used to monitor timeouts. | |
|  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 BaseRemoteProxy(RegistrationRequest request,
                       Registry registry)
request - The requestregistry - The registry to use| Method Detail | 
|---|
public List<TestSlot> getTestSlots()
RemoteProxy
getTestSlots in interface RemoteProxypublic Registry getRegistry()
RemoteProxy
getRegistry in interface RemoteProxypublic CapabilityMatcher getCapabilityHelper()
RemoteProxy
getCapabilityHelper in interface RemoteProxypublic void setupTimeoutListener()
RemoteProxy
setupTimeoutListener in interface RemoteProxypublic String getId()
RemoteProxy
getId in interface RemoteProxypublic void teardown()
RemoteProxy
teardown in interface RemoteProxypublic void forceSlotCleanerRun()
public Map<String,Object> getConfig()
RemoteProxy
getConfig in interface RemoteProxypublic RegistrationRequest getOriginalRegistrationRequest()
RemoteProxy
getOriginalRegistrationRequest in interface RemoteProxypublic int getMaxNumberOfConcurrentTestSessions()
RemoteProxy
getMaxNumberOfConcurrentTestSessions in interface RemoteProxypublic URL getRemoteHost()
RemoteProxy
getRemoteHost in interface RemoteProxypublic TestSession getNewSession(Map<String,Object> requestedCapability)
RemoteProxy
getNewSession in interface RemoteProxyrequestedCapability - the type of test the client is interested in performing.
null otherwisepublic int getTotalUsed()
RemoteProxy
getTotalUsed in interface RemoteProxypublic boolean hasCapability(Map<String,Object> requestedCapability)
RemoteProxyCapabilityMatcher.matches(Map, Map)
 hasCapability = true doesn't mean the test cast start just now, only that the proxy will be
 able to run a test requiring that capability at some point.
hasCapability in interface RemoteProxyrequestedCapability - the type of test the client is interested in performing.
true if presentpublic boolean isBusy()
RemoteProxy
isBusy in interface RemoteProxytrue if the node has any test slots in use.
public static <T extends RemoteProxy> T getNewInstance(RegistrationRequest request,
                                                       Registry registry)
request - The requestregistry - The registry to use
public int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic int compareTo(RemoteProxy o)
compareTo in interface Comparable<RemoteProxy>public String toString()
toString in class Objectpublic HtmlRenderer getHtmlRender()
RemoteProxy
getHtmlRender in interface RemoteProxypublic int getTimeOut()
RemoteProxy
getTimeOut in interface RemoteProxypublic org.openqa.selenium.remote.internal.HttpClientFactory getHttpClientFactory()
RemoteProxy
getHttpClientFactory in interface RemoteProxy
public org.json.JSONObject getStatus()
                              throws GridException
RemoteProxy
getStatus in interface RemoteProxyGridException - If the node if down or doesn't recognize the /wd/hub/status request.public float getResourceUsageInPercent()
RemoteProxy
getResourceUsageInPercent in interface RemoteProxy| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||