-
Notifications
You must be signed in to change notification settings - Fork 5
/
App_Flex.java
40 lines (30 loc) · 1.16 KB
/
App_Flex.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package org.genericsystem.watch.beta;
import io.vertx.core.DeploymentOptions;
import io.vertx.core.Verticle;
import io.vertx.core.Vertx;
import io.vertx.core.VertxOptions;
import io.vertx.core.eventbus.EventBusOptions;
import io.vertx.core.spi.cluster.ClusterManager;
import io.vertx.spi.cluster.hazelcast.HazelcastClusterManager;
import sun.security.x509.CertificateX509Key;
public class App_Flex {
public static final String STEP1 = "app.AtoBEvents";
public static final String STEP2 = "app.BtoCEvents";
public static void deployVerticle(Verticle verticle) {
ClusterManager mgr = new HazelcastClusterManager();
VertxOptions vertxOptions = new VertxOptions().setClustered(true).setClusterManager(mgr);
vertxOptions.setEventBusOptions(new EventBusOptions()).setClustered(true);
vertxOptions.setClusterHost("192.168.1.11");
vertxOptions.setMaxWorkerExecuteTime(Long.MAX_VALUE);
Vertx.clusteredVertx(vertxOptions, res -> {
if (res.succeeded()) {
Vertx vertx = res.result();
vertx.deployVerticle(verticle, result->{
System.out.println(result.result());
});
} else {
throw new IllegalStateException(res.cause());
}
});
}
}