org.openqa.grid.internal
Class ProxySet

java.lang.Object
  extended by org.openqa.grid.internal.ProxySet
All Implemented Interfaces:
java.lang.Iterable<RemoteProxy>

@ThreadSafe
public class ProxySet
extends java.lang.Object
implements java.lang.Iterable<RemoteProxy>

A set of RemoteProxies. Obeys the iteration guarantees of CopyOnWriteArraySet


Constructor Summary
ProxySet(boolean throwOnCapabilityNotPresent)
           
 
Method Summary
 void add(RemoteProxy proxy)
           
 boolean contains(RemoteProxy o)
           
 java.util.List<RemoteProxy> getBusyProxies()
           
 TestSession getNewSession(java.util.Map<java.lang.String,java.lang.Object> desiredCapabilities)
           
 RemoteProxy getProxyById(java.lang.String id)
           
 boolean hasCapability(java.util.Map<java.lang.String,java.lang.Object> requestedCapability)
           
 boolean isEmpty()
           
 java.util.Iterator<RemoteProxy> iterator()
           
 RemoteProxy remove(RemoteProxy proxy)
          Removes the specified instance from the proxySet
 void setThrowOnCapabilityNotPresent(boolean throwOnCapabilityNotPresent)
           
 int size()
           
 void teardown()
          killing the timeout detection threads.
 void verifyAbilityToHandleDesiredCapabilities(java.util.Map<java.lang.String,java.lang.Object> desiredCapabilities)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProxySet

public ProxySet(boolean throwOnCapabilityNotPresent)
Method Detail

teardown

public void teardown()
killing the timeout detection threads.


hasCapability

public boolean hasCapability(java.util.Map<java.lang.String,java.lang.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 java.util.List<RemoteProxy> getBusyProxies()

getProxyById

public RemoteProxy getProxyById(java.lang.String id)

isEmpty

public boolean isEmpty()

getNewSession

public TestSession getNewSession(java.util.Map<java.lang.String,java.lang.Object> desiredCapabilities)

iterator

public java.util.Iterator<RemoteProxy> iterator()
Specified by:
iterator in interface java.lang.Iterable<RemoteProxy>

size

public int size()

verifyAbilityToHandleDesiredCapabilities

public void verifyAbilityToHandleDesiredCapabilities(java.util.Map<java.lang.String,java.lang.Object> desiredCapabilities)

setThrowOnCapabilityNotPresent

public void setThrowOnCapabilityNotPresent(boolean throwOnCapabilityNotPresent)


Copyright © 2011. All Rights Reserved.