org.openqa.grid.selenium.proxy
Class SeleniumRemoteProxy
java.lang.Object
org.openqa.grid.internal.RemoteProxy
org.openqa.grid.selenium.proxy.WebRemoteProxy
org.openqa.grid.selenium.proxy.SeleniumRemoteProxy
- All Implemented Interfaces:
- Comparable<RemoteProxy>, CommandListener, SelfHealingProxy, TimeoutListener
public class SeleniumRemoteProxy
- extends WebRemoteProxy
- implements CommandListener
Method Summary |
void |
beforeCommand(TestSession session,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Executed before the hub forwards the request. reading the content of the
request stream will prevent the content from being forwarded. |
void |
beforeRelease(TestSession session)
Gives a chance to clean the resources on the remote when the session has
timed out. |
CapabilityMatcher |
getCapabilityHelper()
|
Methods inherited from class org.openqa.grid.internal.RemoteProxy |
compareTo, equals, getConfig, getId, getMaxNumberOfConcurrentTestSessions, getNewInstance, getOriginalRegistrationRequest, getRegistry, getRemoteURL, getTestSlots, getTimeOut, getTotalUsed, hashCode, isBusy, setCapabilityHelper, setId, teardown, toString |
SeleniumRemoteProxy
public SeleniumRemoteProxy(RegistrationRequest request,
Registry regidtry)
beforeRelease
public void beforeRelease(TestSession session)
- Description copied from interface:
TimeoutListener
- Gives a chance to clean the resources on the remote when the session has
timed out.
Is executed before the session is released to the hub. If an exception is
thrown, the slot that was associated with the session is considered
corrupted and won't be released for future use.
You can check session.getInternalKey before timing out. internalkey==null
usually means the initial POST /session hasn't been completed yet.For
instance if you use web driver, that means the browser is in the process
of being started. During that state, you can't really clean the resources
properly.
- Specified by:
beforeRelease
in interface TimeoutListener
- Specified by:
beforeRelease
in class WebRemoteProxy
getCapabilityHelper
public CapabilityMatcher getCapabilityHelper()
- Overrides:
getCapabilityHelper
in class RemoteProxy
beforeCommand
public void beforeCommand(TestSession session,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
- Description copied from interface:
CommandListener
- Executed before the hub forwards the request. reading the content of the
request stream will prevent the content from being forwarded.
Throwing an exception will prevent the forward to the remote.
- Specified by:
beforeCommand
in interface CommandListener
- Overrides:
beforeCommand
in class WebRemoteProxy
Copyright © 2011. All Rights Reserved.