作者:mobiledu2502908043 | 来源:互联网 | 2023-10-12 11:50
本文整理了Java中io.vertx.core.spi.VerticleFactory.createVerticle()
方法的一些代码示例,展示了VerticleFactory.createVerticle()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。VerticleFactory.createVerticle()
方法的具体详情如下:
包路径:io.vertx.core.spi.VerticleFactory
类名称:VerticleFactory
方法名:createVerticle
VerticleFactory.createVerticle介绍
[英]Create a verticle instance. If this method is likely to be slow (e.g. Ruby or JS verticles which might have to start up a language engine) then make sure it is run on a worker thread by returning true
from #blockingCreate().
[中]创建一个verticle实例。如果此方法可能很慢(例如Ruby或JS verticles,可能需要启动语言引擎),则通过从#blockingCreate()返回'true',确保它在工作线程上运行。
代码示例
代码示例来源:origin: eclipse-vertx/vert.x
private Verticle[] createVerticles(VerticleFactory verticleFactory, String identifier, int instances, ClassLoader cl) throws Exception {
Verticle[] verticles = new Verticle[instances];
for (int i = 0; i verticles[i] = verticleFactory.createVerticle(identifier, cl);
if (verticles[i] == null) {
throw new NullPointerException("VerticleFactory::createVerticle returned null");
}
}
return verticles;
}
代码示例来源:origin: io.vertx/vertx-core
private Verticle[] createVerticles(VerticleFactory verticleFactory, String identifier, int instances, ClassLoader cl) throws Exception {
Verticle[] verticles = new Verticle[instances];
for (int i = 0; i verticles[i] = verticleFactory.createVerticle(identifier, cl);
if (verticles[i] == null) {
throw new NullPointerException("VerticleFactory::createVerticle returned null");
}
}
return verticles;
}
代码示例来源:origin: michel-kraemer/vertx-lang-typescript
@Override
public Verticle createVerticle(String verticleName, ClassLoader classLoader) throws Exception {
Verticle v = delegateFactory.createVerticle(verticleName, classLoader);
return new TypeScriptVerticle(v);
}