Skip to content

Commit

Permalink
Router is now just an http handler
Browse files Browse the repository at this point in the history
  • Loading branch information
shs96c committed Jul 4, 2019
1 parent 6569cb9 commit e5ed023
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions java/server/src/org/openqa/selenium/grid/router/Router.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,14 @@
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;

Expand All @@ -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);
Expand Down

0 comments on commit e5ed023

Please sign in to comment.