|
24 | 24 | import org.openqa.selenium.grid.web.PathResource;
|
25 | 25 | import org.openqa.selenium.grid.web.ResourceHandler;
|
26 | 26 | import org.openqa.selenium.internal.Require;
|
27 |
| -import org.openqa.selenium.jre.server.JreServer; |
28 | 27 | import org.openqa.selenium.json.Json;
|
29 | 28 | import org.openqa.selenium.net.PortProber;
|
| 29 | +import org.openqa.selenium.netty.server.NettyServer; |
30 | 30 | import org.openqa.selenium.remote.http.HttpClient;
|
31 | 31 | import org.openqa.selenium.remote.http.HttpHandler;
|
32 | 32 | import org.openqa.selenium.remote.http.HttpMethod;
|
|
51 | 51 | import static org.openqa.selenium.remote.http.Route.matching;
|
52 | 52 | import static org.openqa.selenium.remote.http.Route.post;
|
53 | 53 |
|
54 |
| -public class JreAppServer implements AppServer { |
| 54 | +public class NettyAppServer implements AppServer { |
55 | 55 |
|
56 | 56 | private final Server<?> server;
|
57 | 57 |
|
58 |
| - public JreAppServer() { |
| 58 | + public NettyAppServer() { |
59 | 59 | this(emulateJettyAppServer());
|
60 | 60 | }
|
61 | 61 |
|
62 |
| - public JreAppServer(HttpHandler handler) { |
| 62 | + public NettyAppServer(HttpHandler handler) { |
63 | 63 | Require.nonNull("Handler", handler);
|
64 | 64 |
|
65 | 65 | int port = PortProber.findFreePort();
|
66 |
| - server = new JreServer( |
| 66 | + server = new NettyServer( |
67 | 67 | new BaseServerOptions(new MapConfig(singletonMap("server", singletonMap("port", port)))),
|
68 | 68 | handler);
|
69 | 69 | }
|
@@ -162,7 +162,7 @@ public String getAlternateHostName() {
|
162 | 162 | }
|
163 | 163 |
|
164 | 164 | public static void main(String[] args) {
|
165 |
| - JreAppServer server = new JreAppServer(); |
| 165 | + NettyAppServer server = new NettyAppServer(); |
166 | 166 | server.start();
|
167 | 167 |
|
168 | 168 | System.out.println(server.whereIs("/"));
|
|
0 commit comments