Class LocalDistributor
- java.lang.Object
-
- org.openqa.selenium.grid.distributor.Distributor
-
- org.openqa.selenium.grid.distributor.local.LocalDistributor
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,java.util.function.Predicate<org.openqa.selenium.remote.http.HttpRequest>,org.openqa.selenium.remote.http.HttpHandler,org.openqa.selenium.remote.http.Routable,HasReadyState
public class LocalDistributor extends Distributor implements java.io.Closeable
-
-
Constructor Summary
Constructors Constructor Description LocalDistributor(org.openqa.selenium.remote.tracing.Tracer tracer, EventBus bus, org.openqa.selenium.remote.http.HttpClient.Factory clientFactory, SessionMap sessions, NewSessionQueue sessionQueue, SlotSelector slotSelector, Secret registrationSecret, java.time.Duration healthcheckInterval, boolean rejectUnsupportedCaps, java.time.Duration sessionRequestRetryInterval)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description LocalDistributoradd(Node node)voidclose()static Distributorcreate(org.openqa.selenium.grid.config.Config config)booleandrain(NodeId nodeId)protected java.util.Set<NodeStatus>getAvailableNodes()DistributorStatusgetStatus()booleanisReady()org.openqa.selenium.internal.Either<org.openqa.selenium.SessionNotCreatedException,CreateSessionResponse>newSession(SessionRequest request)voidrefresh()voidremove(NodeId nodeId)-
Methods inherited from class org.openqa.selenium.grid.distributor.Distributor
execute, matches, test
-
-
-
-
Constructor Detail
-
LocalDistributor
public LocalDistributor(org.openqa.selenium.remote.tracing.Tracer tracer, EventBus bus, org.openqa.selenium.remote.http.HttpClient.Factory clientFactory, SessionMap sessions, NewSessionQueue sessionQueue, SlotSelector slotSelector, Secret registrationSecret, java.time.Duration healthcheckInterval, boolean rejectUnsupportedCaps, java.time.Duration sessionRequestRetryInterval)
-
-
Method Detail
-
create
public static Distributor create(org.openqa.selenium.grid.config.Config config)
-
isReady
public boolean isReady()
- Specified by:
isReadyin interfaceHasReadyState
-
add
public LocalDistributor add(Node node)
- Specified by:
addin classDistributor
-
drain
public boolean drain(NodeId nodeId)
- Specified by:
drainin classDistributor
-
remove
public void remove(NodeId nodeId)
- Specified by:
removein classDistributor
-
getStatus
public DistributorStatus getStatus()
- Specified by:
getStatusin classDistributor
-
refresh
@Beta public void refresh()
-
getAvailableNodes
protected java.util.Set<NodeStatus> getAvailableNodes()
-
newSession
public org.openqa.selenium.internal.Either<org.openqa.selenium.SessionNotCreatedException,CreateSessionResponse> newSession(SessionRequest request) throws org.openqa.selenium.SessionNotCreatedException
- Specified by:
newSessionin classDistributor- Throws:
org.openqa.selenium.SessionNotCreatedException
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable
-
-