org.openqa.grid.selenium.proxy
Class SeleniumRemoteProxy

java.lang.Object
  extended by org.openqa.grid.internal.RemoteProxy
      extended by org.openqa.grid.selenium.proxy.WebRemoteProxy
          extended by org.openqa.grid.selenium.proxy.SeleniumRemoteProxy
All Implemented Interfaces:
java.lang.Comparable<RemoteProxy>, CommandListener, SelfHealingProxy, TimeoutListener

public class SeleniumRemoteProxy
extends WebRemoteProxy
implements CommandListener


Field Summary
 
Fields inherited from class org.openqa.grid.internal.RemoteProxy
remoteURL
 
Constructor Summary
SeleniumRemoteProxy(RegistrationRequest request, Registry registry)
           
 
Method Summary
 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.selenium.proxy.WebRemoteProxy
addNewEvent, afterCommand, beforeCommand, getHtmlRender, getNewSession, isAlive, isDown, onEvent, startPolling, stopPolling
 
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
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.openqa.grid.internal.listeners.CommandListener
afterCommand, beforeCommand
 

Constructor Detail

SeleniumRemoteProxy

public SeleniumRemoteProxy(RegistrationRequest request,
                           Registry registry)
Method Detail

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


Copyright © 2011. All Rights Reserved.