io.javalin.http.Handler Java Examples

The following examples show how to use io.javalin.http.Handler. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: WdmServer.java    From webdrivermanager with Apache License 2.0 5 votes vote down vote up
public WdmServer(int port) {
    Javalin app = Javalin.create().start(port);
    Handler handler = this::handleRequest;

    app.get("/chromedriver", handler);
    app.get("/firefoxdriver", handler);
    app.get("/edgedriver", handler);
    app.get("/iedriver", handler);
    app.get("/operadriver", handler);
    app.get("/phantomjs", handler);
    app.get("/selenium-server-standalone", handler);

    log.info("WebDriverManager server listening on port {}", port);
}
 
Example #2
Source File: SchoolsEndpoint.java    From schedge with MIT License 4 votes vote down vote up
@NotNull
@Override
public Handler getHandler() {
  return ctx -> { ctx.json(SubjectCode.allSchools()); };
}
 
Example #3
Source File: SubjectsEndpoint.java    From schedge with MIT License 4 votes vote down vote up
@NotNull
@Override
public Handler getHandler() {
  return ctx -> {
    ctx.contentType("application/json");
    ctx.json(SubjectCode.getAvailableSubjectInfo());
  };
}
 
Example #4
Source File: Endpoint.java    From schedge with MIT License votes vote down vote up
public abstract Handler getHandler();