public abstract class VertxFactory
extends java.lang.Object
Use this to create Vertx instances when embedding Vert.x core directly.
Constructor and Description |
---|
VertxFactory() |
Modifier and Type | Method and Description |
---|---|
protected Vertx |
createVertx() |
protected Vertx |
createVertx(int port,
java.lang.String hostname) |
protected void |
createVertx(int port,
java.lang.String hostname,
Handler<AsyncResult<Vertx>> resultHandler) |
protected Vertx |
createVertx(java.lang.String hostname) |
static Vertx |
newVertx()
Create a non clustered Vertx instance
|
static Vertx |
newVertx(int port,
java.lang.String hostname)
Create a clustered Vertx instance.
|
static void |
newVertx(int port,
java.lang.String hostname,
Handler<AsyncResult<Vertx>> resultHandler)
Create a clustered Vertx instance returning the instance asynchronously in the resultHandler
when the event bus is ready and listening
|
static Vertx |
newVertx(java.lang.String hostname)
Create a clustered Vertx instance listening for cluster connections on the default port 25500
|
public static Vertx newVertx()
public static Vertx newVertx(java.lang.String hostname)
hostname
- The hostname or ip address to listen for cluster connectionspublic static Vertx newVertx(int port, java.lang.String hostname)
port
- The port to listen for cluster connectionshostname
- The hostname or ip address to listen for cluster connectionspublic static void newVertx(int port, java.lang.String hostname, Handler<AsyncResult<Vertx>> resultHandler)
port
- The port to listen for cluster connectionshostname
- The hostname or ip address to listen for cluster connectionsprotected Vertx createVertx()
protected Vertx createVertx(java.lang.String hostname)
protected Vertx createVertx(int port, java.lang.String hostname)
protected void createVertx(int port, java.lang.String hostname, Handler<AsyncResult<Vertx>> resultHandler)