io.github.sinri.keel.verticles.KeelVerticle Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of Keel Show documentation
Show all versions of Keel Show documentation
A website framework with VERT.X for ex-PHP-ers, exactly Ark Framework Users.
The newest version!
package io.github.sinri.keel.verticles;
import io.vertx.core.AbstractVerticle;
import io.vertx.core.DeploymentOptions;
import io.vertx.core.Future;
import io.vertx.core.Verticle;
import io.vertx.core.json.JsonObject;
import static io.github.sinri.keel.facade.KeelInstance.Keel;
/**
* @since 1.14
* @since 3.2.0 remove logger
*/
public interface KeelVerticle extends Verticle {
/**
* copied from AbstractVerticle
*
* @since 2.8
*/
String deploymentID();
/**
* copied from AbstractVerticle
*
* @see AbstractVerticle
* @since 2.8
*/
JsonObject config();
default JsonObject getVerticleInfo() {
return new JsonObject()
.put("class", this.getClass().getName())
.put("config", this.config())
.put("deployment_id", this.deploymentID());
}
default Future deployMe(DeploymentOptions deploymentOptions) {
return Keel.getVertx().deployVerticle(this, deploymentOptions);
}
/**
* @since 2.8 add default implementation
*/
default Future undeployMe() {
return Keel.getVertx().undeploy(deploymentID());
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy