MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / Router

Method Router

java/src/org/openqa/selenium/grid/router/Router.java:47–69  ·  view source on GitHub ↗
(
      Tracer tracer,
      HttpClient.Factory clientFactory,
      SessionMap sessions,
      NewSessionQueue queue,
      Distributor distributor)

Source from the content-addressed store, hash-verified

45 private final HandleSession sessionHandler;
46
47 public Router(
48 Tracer tracer,
49 HttpClient.Factory clientFactory,
50 SessionMap sessions,
51 NewSessionQueue queue,
52 Distributor distributor) {
53 Require.nonNull("Tracer to use", tracer);
54 Require.nonNull("HTTP client factory", clientFactory);
55
56 this.sessions = Require.nonNull("Session map", sessions);
57 this.queue = Require.nonNull("New Session Request Queue", queue);
58 this.distributor = Require.nonNull("Distributor", distributor);
59
60 this.sessionHandler = new HandleSession(tracer, clientFactory, sessions);
61
62 routes =
63 combine(
64 get("/status").to(() -> new GridStatusHandler(tracer, distributor)),
65 sessions.with(new SpanDecorator(tracer, req -> "session_map")),
66 queue.with(new SpanDecorator(tracer, req -> "session_queue")),
67 distributor.with(new SpanDecorator(tracer, req -> "distributor")),
68 matching(req -> req.getUri().startsWith("/session/")).to(() -> sessionHandler));
69 }
70
71 @Override
72 public boolean isReady() {

Callers

nothing calls this directly

Calls 7

nonNullMethod · 0.95
combineMethod · 0.80
matchingMethod · 0.80
toMethod · 0.65
getMethod · 0.65
withMethod · 0.65
getUriMethod · 0.65

Tested by

no test coverage detected