Class LocalNode
- java.lang.Object
-
- org.openqa.selenium.grid.node.Node
-
- org.openqa.selenium.grid.node.local.LocalNode
-
- All Implemented Interfaces:
HttpHandler
,Routable
,HasReadyState
public class LocalNode extends Node
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LocalNode.Builder
-
Constructor Summary
Constructors Modifier Constructor Description protected
LocalNode(Tracer tracer, EventBus bus, java.net.URI uri, java.net.URI gridUri, HealthCheck healthCheck, int maxSessionCount, int drainAfterSessionCount, boolean cdpEnabled, boolean bidiEnabled, com.google.common.base.Ticker ticker, java.time.Duration sessionTimeout, java.time.Duration heartbeatPeriod, java.util.List<SessionSlot> factories, Secret registrationSecret, boolean managedDownloadsEnabled)
-
Method Summary
-
Methods inherited from class org.openqa.selenium.grid.node.Node
execute, getId, getNodeVersion, getOsInfo, getUri, isDraining, matches
-
-
-
-
Constructor Detail
-
LocalNode
protected LocalNode(Tracer tracer, EventBus bus, java.net.URI uri, java.net.URI gridUri, HealthCheck healthCheck, int maxSessionCount, int drainAfterSessionCount, boolean cdpEnabled, boolean bidiEnabled, com.google.common.base.Ticker ticker, java.time.Duration sessionTimeout, java.time.Duration heartbeatPeriod, java.util.List<SessionSlot> factories, Secret registrationSecret, boolean managedDownloadsEnabled)
-
-
Method Detail
-
builder
public static LocalNode.Builder builder(Tracer tracer, EventBus bus, java.net.URI uri, java.net.URI gridUri, Secret registrationSecret)
-
isReady
public boolean isReady()
-
getCurrentSessionCount
public int getCurrentSessionCount()
-
getDownloadsIdForSession
public java.util.UUID getDownloadsIdForSession(SessionId id)
-
getMaxSessionCount
public int getMaxSessionCount()
-
getAvailability
public Availability getAvailability()
-
getTotalSlots
public int getTotalSlots()
-
getUsedSlots
public long getUsedSlots()
-
getLoad
public float getLoad()
-
getExternalUri
public java.net.URI getExternalUri()
-
getGridUri
public java.net.URI getGridUri()
-
getNodeId
public java.lang.String getNodeId()
-
isSupporting
public boolean isSupporting(Capabilities capabilities)
- Specified by:
isSupporting
in classNode
-
newSession
public Either<WebDriverException,CreateSessionResponse> newSession(CreateSessionRequest sessionRequest)
- Specified by:
newSession
in classNode
-
isSessionOwner
public boolean isSessionOwner(SessionId id)
- Specified by:
isSessionOwner
in classNode
-
getSession
public Session getSession(SessionId id) throws NoSuchSessionException
- Specified by:
getSession
in classNode
- Throws:
NoSuchSessionException
-
getUploadsFilesystem
public TemporaryFilesystem getUploadsFilesystem(SessionId id) throws java.io.IOException
- Overrides:
getUploadsFilesystem
in classNode
- Throws:
java.io.IOException
-
getDownloadsFilesystem
public TemporaryFilesystem getDownloadsFilesystem(java.util.UUID uuid) throws java.io.IOException
- Overrides:
getDownloadsFilesystem
in classNode
- Throws:
java.io.IOException
-
executeWebDriverCommand
public HttpResponse executeWebDriverCommand(HttpRequest req)
- Specified by:
executeWebDriverCommand
in classNode
-
downloadFile
public HttpResponse downloadFile(HttpRequest req, SessionId id)
- Specified by:
downloadFile
in classNode
-
uploadFile
public HttpResponse uploadFile(HttpRequest req, SessionId id)
- Specified by:
uploadFile
in classNode
-
stop
public void stop(SessionId id) throws NoSuchSessionException
- Specified by:
stop
in classNode
- Throws:
NoSuchSessionException
-
getStatus
public NodeStatus getStatus()
-
getHealthCheck
public HealthCheck getHealthCheck()
- Specified by:
getHealthCheck
in classNode
-
-