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

JavaVertXWebServer.supportFiles.MainVerticle.mustache Maven / Gradle / Ivy

The newest version!
package {{invokerPackage}};

import io.vertx.core.DeploymentOptions;
import io.vertx.core.Future;
import io.vertx.reactivex.core.AbstractVerticle;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class MainVerticle extends AbstractVerticle {

    private static final Logger logger = LoggerFactory.getLogger(MainVerticle.class);

    @Override
    public void start(Future future) {

        DeploymentOptions options = new DeploymentOptions();
        options.setInstances(Runtime.getRuntime().availableProcessors());

        vertx.deployVerticle(HttpServerVerticle.class.getName(), options, res -> {
            if (!res.succeeded()) {
                logger.error("Deployment fail reason: ", res.cause());
            }
        });
    }
}
    





© 2015 - 2025 Weber Informatics LLC | Privacy Policy