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

kotlin-vertx-server.api_verticle.mustache Maven / Gradle / Ivy

There is a newer version: 7.9.0
Show newest version
package {{package}}
import io.vertx.core.Vertx
import io.vertx.core.AbstractVerticle
import io.vertx.serviceproxy.ServiceBinder

fun main(){
    Vertx.vertx().deployVerticle({{classname}}Verticle())
}

class {{classname}}Verticle:AbstractVerticle() {

    override fun start() {
        val instance = (javaClass.classLoader.loadClass("{{package}}.{{classname}}Impl").newInstance() as {{classname}})
        instance.init(vertx,config())
        ServiceBinder(vertx)
            .setAddress({{classname}}.address)
            .register({{classname}}::class.java,instance)
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy