Class LocalDistributor

java.lang.Object
org.openqa.selenium.grid.distributor.Distributor
org.openqa.selenium.grid.distributor.local.LocalDistributor
All Implemented Interfaces:
AutoCloseable, 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 AutoCloseable
  • Constructor Details

    • 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, Duration healthcheckInterval, boolean rejectUnsupportedCaps, Duration sessionRequestRetryInterval, int newSessionThreadPoolSize, SlotMatcher slotMatcher)
  • Method Details

    • create

      public static Distributor create(Config config)
    • isReady

      public boolean isReady()
      Specified by:
      isReady in interface HasReadyState
    • add

      public LocalDistributor add(Node node)
      Specified by:
      add in class Distributor
    • drain

      public boolean drain(NodeId nodeId)
      Specified by:
      drain in class Distributor
    • remove

      public void remove(NodeId nodeId)
      Specified by:
      remove in class Distributor
    • getStatus

      public DistributorStatus getStatus()
      Specified by:
      getStatus in class Distributor
    • refresh

      @Beta public void refresh()
    • getAvailableNodes

      protected 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:
      newSession in class Distributor
      Throws:
      org.openqa.selenium.SessionNotCreatedException
    • getUpNodeCount

      public long getUpNodeCount()
    • getDownNodeCount

      public long getDownNodeCount()
    • getActiveSlots

      public int getActiveSlots()
    • getIdleSlots

      public int getIdleSlots()
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
    • getNodeFromURI

      protected Node getNodeFromURI(URI uri)