hudson.plugins.selenium
Class HudsonRemoteControlPool

java.lang.Object
  extended by hudson.plugins.selenium.HudsonRemoteControlPool
All Implemented Interfaces:
com.thoughtworks.selenium.grid.hub.remotecontrol.DynamicRemoteControlPool, com.thoughtworks.selenium.grid.hub.remotecontrol.RemoteControlPool

public class HudsonRemoteControlPool
extends Object
implements com.thoughtworks.selenium.grid.hub.remotecontrol.DynamicRemoteControlPool

DynamicRemoteControlPool that uses labels for matching.

The "environment" that Selenium see is '/'-separated list of labels for the slave (like /a/b/c/d), and we match incoming label to determine the RemoteControlProxy.

Author:
Kohsuke Kawaguchi

Constructor Summary
HudsonRemoteControlPool()
           
 
Method Summary
 List<com.thoughtworks.selenium.grid.hub.remotecontrol.RemoteControlProxy> allRegisteredRemoteControls()
           
 void associateWithSession(com.thoughtworks.selenium.grid.hub.remotecontrol.RemoteControlProxy rc, String sessionId)
           
 List<com.thoughtworks.selenium.grid.hub.remotecontrol.RemoteControlProxy> availableRemoteControls()
           
 boolean isRegistered(com.thoughtworks.selenium.grid.hub.remotecontrol.RemoteControlProxy proxy)
           
 void recycleAllSessionsIdleForTooLong(double maxIdleTimeInSeconds)
           
 void register(com.thoughtworks.selenium.grid.hub.remotecontrol.RemoteControlProxy rc)
           
 void release(com.thoughtworks.selenium.grid.hub.remotecontrol.RemoteControlProxy rc)
           
 void releaseForSession(String sessionId)
           
 com.thoughtworks.selenium.grid.hub.remotecontrol.RemoteControlProxy reserve(com.thoughtworks.selenium.grid.hub.Environment env)
           
 List<com.thoughtworks.selenium.grid.hub.remotecontrol.RemoteControlProxy> reservedRemoteControls()
           
 com.thoughtworks.selenium.grid.hub.remotecontrol.RemoteControlProxy retrieve(String sessionId)
           
 boolean unregister(com.thoughtworks.selenium.grid.hub.remotecontrol.RemoteControlProxy rc)
           
 void unregisterAllUnresponsiveRemoteControls()
           
 void updateSessionLastActiveAt(String sessionId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HudsonRemoteControlPool

public HudsonRemoteControlPool()
Method Detail

register

public void register(com.thoughtworks.selenium.grid.hub.remotecontrol.RemoteControlProxy rc)
Specified by:
register in interface com.thoughtworks.selenium.grid.hub.remotecontrol.DynamicRemoteControlPool

unregister

public boolean unregister(com.thoughtworks.selenium.grid.hub.remotecontrol.RemoteControlProxy rc)
Specified by:
unregister in interface com.thoughtworks.selenium.grid.hub.remotecontrol.DynamicRemoteControlPool

isRegistered

public boolean isRegistered(com.thoughtworks.selenium.grid.hub.remotecontrol.RemoteControlProxy proxy)
Specified by:
isRegistered in interface com.thoughtworks.selenium.grid.hub.remotecontrol.DynamicRemoteControlPool

allRegisteredRemoteControls

public List<com.thoughtworks.selenium.grid.hub.remotecontrol.RemoteControlProxy> allRegisteredRemoteControls()
Specified by:
allRegisteredRemoteControls in interface com.thoughtworks.selenium.grid.hub.remotecontrol.DynamicRemoteControlPool

availableRemoteControls

public List<com.thoughtworks.selenium.grid.hub.remotecontrol.RemoteControlProxy> availableRemoteControls()
Specified by:
availableRemoteControls in interface com.thoughtworks.selenium.grid.hub.remotecontrol.DynamicRemoteControlPool

reservedRemoteControls

public List<com.thoughtworks.selenium.grid.hub.remotecontrol.RemoteControlProxy> reservedRemoteControls()
Specified by:
reservedRemoteControls in interface com.thoughtworks.selenium.grid.hub.remotecontrol.DynamicRemoteControlPool

unregisterAllUnresponsiveRemoteControls

public void unregisterAllUnresponsiveRemoteControls()
Specified by:
unregisterAllUnresponsiveRemoteControls in interface com.thoughtworks.selenium.grid.hub.remotecontrol.DynamicRemoteControlPool

recycleAllSessionsIdleForTooLong

public void recycleAllSessionsIdleForTooLong(double maxIdleTimeInSeconds)
Specified by:
recycleAllSessionsIdleForTooLong in interface com.thoughtworks.selenium.grid.hub.remotecontrol.DynamicRemoteControlPool

reserve

public com.thoughtworks.selenium.grid.hub.remotecontrol.RemoteControlProxy reserve(com.thoughtworks.selenium.grid.hub.Environment env)
Specified by:
reserve in interface com.thoughtworks.selenium.grid.hub.remotecontrol.RemoteControlPool

release

public void release(com.thoughtworks.selenium.grid.hub.remotecontrol.RemoteControlProxy rc)
Specified by:
release in interface com.thoughtworks.selenium.grid.hub.remotecontrol.RemoteControlPool

associateWithSession

public void associateWithSession(com.thoughtworks.selenium.grid.hub.remotecontrol.RemoteControlProxy rc,
                                 String sessionId)
Specified by:
associateWithSession in interface com.thoughtworks.selenium.grid.hub.remotecontrol.RemoteControlPool

retrieve

public com.thoughtworks.selenium.grid.hub.remotecontrol.RemoteControlProxy retrieve(String sessionId)
Specified by:
retrieve in interface com.thoughtworks.selenium.grid.hub.remotecontrol.RemoteControlPool

releaseForSession

public void releaseForSession(String sessionId)
Specified by:
releaseForSession in interface com.thoughtworks.selenium.grid.hub.remotecontrol.RemoteControlPool

updateSessionLastActiveAt

public void updateSessionLastActiveAt(String sessionId)
Specified by:
updateSessionLastActiveAt in interface com.thoughtworks.selenium.grid.hub.remotecontrol.RemoteControlPool


Copyright © 2004-2011. All Rights Reserved.