All Downloads are FREE. Search and download functionalities are using the official Maven repository.

le-annen.javaserver.0.1.source-code.ConfigRoutes Maven / Gradle / Ivy

Go to download

A minimal java http server which fulfills small portions of the http specifications. This is not a full fledged or secure server. It should only be used for learning purposes and contains no guarantees of any king.

The newest version!
class ConfigRoutes {
  private Router router;

  ConfigRoutes(Router router) {
    this.router = router;
    this.initialize();
  }

  private void initialize() {
    this.initializeGetRoutes();
    this.initializePostRoutes();
  }

  private void initializeGetRoutes() {
    ControllerFile controllerFile = new ControllerFile();
    router.addRoute("GET","/resources/form/index.html", controllerFile);
  }

  private void initializePostRoutes() {
    ControllerPost controllerPost = new ControllerPost();
    router.addRoute("POST", "/resources/form", controllerPost);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy