public abstract class ESVerticleFactory extends Object implements io.vertx.core.spi.VerticleFactory
createRuntime(ECMAEngine) to create the runtime where scripts will runcreateVerticle(Runtime, String) to create the verticle that wraps the script| Modifier and Type | Field and Description |
|---|---|
protected ECMAEngine |
engine |
| Constructor and Description |
|---|
ESVerticleFactory() |
| Modifier and Type | Method and Description |
|---|---|
protected Runtime |
createRuntime(ECMAEngine engine)
Create a runtime.
|
protected abstract io.vertx.core.Verticle |
createVerticle(Runtime runtime,
String fsVerticleName)
Create a vertx verticle that wraps the script, it will use the runtime configured in the
createRuntime(ECMAEngine) method. |
io.vertx.core.Verticle |
createVerticle(String verticleName,
ClassLoader classLoader) |
void |
init(io.vertx.core.Vertx vertx) |
protected String |
mainScript(String fsVerticleName)
Utility to extract the main script name from the command line arguments.
|
int |
order() |
protected ECMAEngine engine
public void init(io.vertx.core.Vertx vertx)
init in interface io.vertx.core.spi.VerticleFactorypublic int order()
order in interface io.vertx.core.spi.VerticleFactoryprotected Runtime createRuntime(ECMAEngine engine)
ECMAEngine.newContext(Source...) to create the runtime.
This method allows the customization of the runtime (which initial scripts will be run, and add/remove objects to the global scope).
engine - the graaljs engine.protected abstract io.vertx.core.Verticle createVerticle(Runtime runtime, String fsVerticleName)
createRuntime(ECMAEngine) method.fsVerticleName - the name as provided during the application initialization.runtime - the runtime created before.public final io.vertx.core.Verticle createVerticle(String verticleName, ClassLoader classLoader)
createVerticle in interface io.vertx.core.spi.VerticleFactoryCopyright © 2019. All rights reserved.