本文整理汇总了Java中org.vertx.java.platform.Verticle类的典型用法代码示例。如果您正苦于以下问题:Java Verticle类的具体用法?Java Verticle怎么用?Java Verticle使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Verticle类属于org.vertx.java.platform包,在下文中一共展示了Verticle类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createVerticle
import org.vertx.java.platform.Verticle; //导入依赖的package包/类
/**
* Creates a verticle instance.
*/
@Override
public Verticle createVerticle(String main) throws Exception {
if (context == null) {
this.initQuercusContext();
}
String scriptPath = findScript(main);
if (scriptPath == null) {
throw new VertxException(String.format("%s is not a valid PHP verticle.", main));
}
return new PhpVerticle(context, scriptPath);
}
示例2: createVerticle
import org.vertx.java.platform.Verticle; //导入依赖的package包/类
@Override
public Verticle createVerticle(String main) throws Exception {
JsonObject json = loadJson(main);
String cluster = json.getString("cluster");
Vertigo vertigo = new Vertigo(vertx, container);
NetworkConfig network = vertigo.createNetwork(json);
Verticle verticle = new NetworkVerticle(vertigo, cluster, network);
verticle.setVertx(vertx);
verticle.setContainer(container);
return verticle;
}
示例3: createVerticle
import org.vertx.java.platform.Verticle; //导入依赖的package包/类
@Override
public Verticle createVerticle(String main) throws Exception {
return new SpringVerticle(vertx, loader, container, main.replaceFirst(PREFIX, ""));
}
示例4: createVerticle
import org.vertx.java.platform.Verticle; //导入依赖的package包/类
/**
* Creates a verticle instance.
*/
@Override
public Verticle createVerticle(String main) throws Exception {
return new PhpVerticle(findScript(main));
}
示例5: Vertigo
import org.vertx.java.platform.Verticle; //导入依赖的package包/类
public Vertigo(Verticle verticle) {
this(verticle.getVertx(), verticle.getContainer());
}