Class SessionSlot
java.lang.Object
org.openqa.selenium.grid.node.local.SessionSlot
- All Implemented Interfaces:
Function<CreateSessionRequest,,Either<WebDriverException, ActiveSession>> Predicate<Capabilities>,HttpHandler
public class SessionSlot
extends Object
implements HttpHandler, Function<CreateSessionRequest,Either<WebDriverException,ActiveSession>>, Predicate<Capabilities>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(CreateSessionRequest sessionRequest) execute(HttpRequest req) getId()booleanbooleanbooleanbooleanbooleanvoidrelease()voidreserve()voidstop()voidstop(SessionClosedReason reason) booleantest(Capabilities capabilities) booleantryReserve(Capabilities capabilities) Atomically attempts to reserve this slot if it's available and matches the given capabilities.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.openqa.selenium.remote.http.HttpHandler
with
-
Constructor Details
-
SessionSlot
-
-
Method Details
-
getId
-
getStereotype
-
reserve
public void reserve() -
tryReserve
Atomically attempts to reserve this slot if it's available and matches the given capabilities. This method is thread-safe and eliminates the need for external synchronization.- Parameters:
capabilities- the capabilities to test against this slot's stereotype- Returns:
- true if the slot was successfully reserved, false if already reserved or capabilities don't match
-
release
public void release() -
isAvailable
public boolean isAvailable() -
getSession
-
stop
public void stop() -
stop
-
execute
- Specified by:
executein interfaceHttpHandler- Throws:
UncheckedIOException
-
test
- Specified by:
testin interfacePredicate<Capabilities>
-
apply
- Specified by:
applyin interfaceFunction<CreateSessionRequest,Either<WebDriverException, ActiveSession>>
-
isSupportingCdp
public boolean isSupportingCdp() -
isSupportingBiDi
public boolean isSupportingBiDi() -
hasRelayFactory
public boolean hasRelayFactory() -
isRelayServiceUp
public boolean isRelayServiceUp() -
getConnectionCounter
-