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

Method fallbackTo

java/src/org/openqa/selenium/remote/http/Route.java:44–52  ·  view source on GitHub ↗
(Supplier<HttpHandler> handler)

Source from the content-addressed store, hash-verified

42public abstract class Route implements HttpHandler, Routable {
43
44 public HttpHandler fallbackTo(Supplier<HttpHandler> handler) {
45 Require.nonNull("Handler", handler);
46 return req -> {
47 if (matches(req)) {
48 return Route.this.execute(req);
49 }
50 return Require.state("Handler", handler.get()).nonNull().execute(req);
51 };
52 }
53
54 @Override
55 public final HttpResponse execute(HttpRequest req) {

Callers 1

Calls 5

nonNullMethod · 0.95
stateMethod · 0.95
matchesMethod · 0.65
executeMethod · 0.65
getMethod · 0.65

Tested by 1