public abstract class Verticle
extends java.lang.Object
Vert.x code is packaged into Verticle's and then deployed and executed by the Vert.x platform.
Verticles can be written in different languages.
Modifier and Type | Field and Description |
---|---|
protected Container |
container
A reference to the vert.x container
|
protected Vertx |
vertx
A reference to the vert.x runtime
|
Constructor and Description |
---|
Verticle() |
Modifier and Type | Method and Description |
---|---|
Container |
getContainer() |
Vertx |
getVertx() |
void |
setContainer(Container container)
Inject the container
|
void |
setVertx(Vertx vertx)
Inject vertx
|
void |
start()
Vert.x calls the start method when the verticle is deployed
|
void |
start(Future<java.lang.Void> startedResult)
Override this method to signify that start is complete sometime _after_ the start() method has returned
This is useful if your verticle deploys other verticles or modules and you don't want this verticle to
be considered started until the other modules and verticles have been started.
|
void |
stop()
Vert.x calls the stop method when the verticle is undeployed.
|
protected Vertx vertx
protected Container container
public Container getContainer()
public void setContainer(Container container)
public Vertx getVertx()
public void setVertx(Vertx vertx)
public void start()
public void start(Future<java.lang.Void> startedResult)
startedResult
- When you are happy your verticle is started set the resultpublic void stop()