Router is now just an http handler
import org.openqa.selenium.remote.http.Route;
import org.openqa.selenium.remote.tracing.DistributedTracer;
-import java.util.function.Predicate;
-
import static org.openqa.selenium.remote.http.Route.combine;
import static org.openqa.selenium.remote.http.Route.get;
import static org.openqa.selenium.remote.http.Route.matching;
/**
* A simple router that is aware of the selenium-protocol.
*/
-public class Router implements Predicate<HttpRequest>, Routable, HttpHandler {
+public class Router implements Routable, HttpHandler {
private final Route routes;
@@ -55,11 +53,6 @@ public Router(
.to(() -> new HandleSession(tracer, clientFactory, sessions)));
}
- @Override
- public boolean test(HttpRequest req) {
- return routes.matches(req);
- }
-
@Override
public boolean matches(HttpRequest req) {
return routes.matches(req);
