// Path: src/main/java/org/audit4j/microservice/core/HTTPServer.java
// public interface HTTPServer extends Initializable{
// 
//     void setPort(int port);
//     
//     public static HTTPServer create(int port) {
//         return new VertxServer(port);
//       }
// }
// 
// Path: src/main/java/org/audit4j/microservice/web/rest/RestRouter.java
// public class RestRouter {
// 
//     Vertx vertx;
// 
//     public RestRouter(Vertx vertx) {
//         this.vertx = vertx;
//     }
// 
//     public Router getRouter() {
//         Router router = Router.router(vertx);
// 
//         router.get("/health").handler(this::handlerHealth);
//         router.post("/rest/event").handler(new RESTAuditEventHandler()::handleEvent);
// 
//         return router;
//     }
// 
//     private void handlerHealth(RoutingContext routingContext) {
//         HttpServerResponse response = routingContext.response();
//         response.putHeader("content-type", "application/json")
//                 .end(new JsonObject().put("status", "running").encodePrettily());
//     }
// }


import org.audit4j.core.exception.InitializationException;
import org.audit4j.microservice.core.HTTPServer;
import org.audit4j.microservice.web.rest.RestRouter;
import io.vertx.core.AbstractVerticle;
import io.vertx.core.Vertx;
import io.vertx.ext.web.Router;
import io.vertx.ext.web.handler.StaticHandler;
package org.audit4j.microservice.web;



public class VertxServer extends AbstractVerticle implements HTTPServer{

    private int port;
    
    Vertx vertx;
    
    public VertxServer(int port) {
        this.port = port;
    }
    
    @Override
    public void start() {
        WebRouter webRouter = new WebRouter(vertx);
        Router router = webRouter.getRouter();

// Path: src/main/java/org/audit4j/microservice/core/HTTPServer.java
// public interface HTTPServer extends Initializable{
// 
//     void setPort(int port);
//     
//     public static HTTPServer create(int port) {
//         return new VertxServer(port);
//       }
// }
// 
// Path: src/main/java/org/audit4j/microservice/web/rest/RestRouter.java
// public class RestRouter {
// 
//     Vertx vertx;
// 
//     public RestRouter(Vertx vertx) {
//         this.vertx = vertx;
//     }
// 
//     public Router getRouter() {
//         Router router = Router.router(vertx);
// 
//         router.get("/health").handler(this::handlerHealth);
//         router.post("/rest/event").handler(new RESTAuditEventHandler()::handleEvent);
// 
//         return router;
//     }
// 
//     private void handlerHealth(RoutingContext routingContext) {
//         HttpServerResponse response = routingContext.response();
//         response.putHeader("content-type", "application/json")
//                 .end(new JsonObject().put("status", "running").encodePrettily());
//     }
// }


// Path: src/main/java/org/audit4j/microservice/web/VertxServer.java
import org.audit4j.core.exception.InitializationException;
import org.audit4j.microservice.core.HTTPServer;
import org.audit4j.microservice.web.rest.RestRouter;
import io.vertx.core.AbstractVerticle;
import io.vertx.core.Vertx;
import io.vertx.ext.web.Router;
import io.vertx.ext.web.handler.StaticHandler;

package org.audit4j.microservice.web;



public class VertxServer extends AbstractVerticle implements HTTPServer{

    private int port;
    
    Vertx vertx;
    
    public VertxServer(int port) {
        this.port = port;
    }
    
    @Override
    public void start() {
        WebRouter webRouter = new WebRouter(vertx);
        Router router = webRouter.getRouter();

        RestRouter restRouter = new RestRouter(vertx);