|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openqa.grid.internal.BaseRemoteProxy
org.openqa.grid.selenium.proxy.DefaultRemoteProxy
public class DefaultRemoteProxy
Default remote proxy for selenium, handling both selenium1 and webdriver requests.
| Field Summary |
|---|
| Fields inherited from class org.openqa.grid.internal.BaseRemoteProxy |
|---|
remoteHost |
| Constructor Summary | |
|---|---|
DefaultRemoteProxy(RegistrationRequest request,
Registry registry)
|
|
| Method Summary | |
|---|---|
void |
addNewEvent(RemoteException event)
Allow to record when something important about the remote state is detected. |
void |
afterCommand(TestSession session,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Executed just before the forwards returns. |
void |
afterSession(TestSession session)
Will be run after the last command is forwarded, but before the proxy slot is released. |
void |
beforeCommand(TestSession session,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Executed before the hub forwards the request. |
void |
beforeRelease(TestSession session)
Gives a chance to clean the resources on the remote when the session has timed out. |
void |
beforeSession(TestSession session)
The client shouldn't have to care where firefox is installed as long as the correct version is launched, however with webdriver the binary location is specified in the desiredCapability, making it the responsibility of the person running the test. |
HtmlRenderer |
getHtmlRender()
Returns the object responsible for rendering any information about the proxy in a Web application. |
TestSession |
getNewSession(java.util.Map<java.lang.String,java.lang.Object> requestedCapability)
overwrites the session allocation to discard the proxy that are down. |
boolean |
isAlive()
|
boolean |
isDown()
|
void |
onEvent(java.util.List<RemoteException> events,
RemoteException lastInserted)
Allow to process the list of all the events that were detected on this Remote so far. |
void |
startPolling()
start/restart the polling for the remote proxy. |
void |
stopPolling()
put the polling on hold. |
void |
teardown()
If the RemoteProxy implementation also implements TimeoutListener, then this method will stop the thread used to monitor timeouts. |
| Methods inherited from class org.openqa.grid.internal.BaseRemoteProxy |
|---|
compareTo, equals, forceSlotCleanerRun, getCapabilityHelper, getConfig, getHttpClientFactory, getId, getMaxNumberOfConcurrentTestSessions, getNewInstance, getOriginalRegistrationRequest, getRegistry, getRemoteHost, getResourceUsageInPercent, getStatus, getTestSlots, getTimeOut, getTotalUsed, hasCapability, hashCode, isBusy, setupTimeoutListener, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultRemoteProxy(RegistrationRequest request,
Registry registry)
| Method Detail |
|---|
public void beforeRelease(TestSession session)
TimeoutListener
beforeRelease in interface TimeoutListener
public void afterCommand(TestSession session,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
CommandListener
afterCommand in interface CommandListener
public void beforeCommand(TestSession session,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
CommandListener
beforeCommand in interface CommandListenerpublic HtmlRenderer getHtmlRender()
RemoteProxy
getHtmlRender in interface RemoteProxygetHtmlRender in class BaseRemoteProxypublic boolean isAlive()
public void startPolling()
SelfHealingProxy
startPolling in interface SelfHealingProxypublic void stopPolling()
SelfHealingProxy
stopPolling in interface SelfHealingProxypublic void addNewEvent(RemoteException event)
SelfHealingProxy
addNewEvent in interface SelfHealingProxy
public void onEvent(java.util.List<RemoteException> events,
RemoteException lastInserted)
SelfHealingProxy
onEvent in interface SelfHealingProxypublic TestSession getNewSession(java.util.Map<java.lang.String,java.lang.Object> requestedCapability)
getNewSession in interface RemoteProxygetNewSession in class BaseRemoteProxyrequestedCapability - the type of test the client is interested in performing.
null otherwisepublic boolean isDown()
public void beforeSession(TestSession session)
For instance if a node registers: {"browserName":"firefox","version":"7.0","firefox_binary":"/home/ff7"} and later on a client requests {"browserName":"firefox","version":"7.0"} , the hub will automatically append the correct binary path to the desiredCapability before it's forwarded to the server. That way the version / install location mapping is done only once at the node level.
beforeSession in interface TestSessionListenerif the setup applies to all the tests.public void afterSession(TestSession session)
TestSessionListener
afterSession in interface TestSessionListenerpublic void teardown()
RemoteProxy
teardown in interface RemoteProxyteardown in class BaseRemoteProxy
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||