org.openqa.grid.internal
Class ProxySet
java.lang.Object
org.openqa.grid.internal.ProxySet
- All Implemented Interfaces:
- Iterable<RemoteProxy>
@ThreadSafe
public class ProxySet
- extends Object
- implements Iterable<RemoteProxy>
A set of RemoteProxies.
Obeys the iteration guarantees of CopyOnWriteArraySet
Constructor Summary |
ProxySet(boolean throwOnCapabilityNotPresent)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ProxySet
public ProxySet(boolean throwOnCapabilityNotPresent)
teardown
public void teardown()
- killing the timeout detection threads.
hasCapability
public boolean hasCapability(Map<String,Object> requestedCapability)
remove
public RemoteProxy remove(RemoteProxy proxy)
- Removes the specified instance from the proxySet
- Parameters:
proxy
- The proxy to remove, must be present in this set
- Returns:
- The instance that was removed. Not null.
add
public void add(RemoteProxy proxy)
contains
public boolean contains(RemoteProxy o)
getBusyProxies
public List<RemoteProxy> getBusyProxies()
getProxyById
public RemoteProxy getProxyById(String id)
isEmpty
public boolean isEmpty()
getNewSession
public TestSession getNewSession(Map<String,Object> desiredCapabilities)
iterator
public Iterator<RemoteProxy> iterator()
- Specified by:
iterator
in interface Iterable<RemoteProxy>
size
public int size()
verifyAbilityToHandleDesiredCapabilities
public void verifyAbilityToHandleDesiredCapabilities(Map<String,Object> desiredCapabilities)
setThrowOnCapabilityNotPresent
public void setThrowOnCapabilityNotPresent(boolean throwOnCapabilityNotPresent)
Copyright © 2012. All Rights Reserved.