use of io.vertx.core.http.HttpServer in project vertx-zero by silentbalanceyh.
the class ZeroApiAgent method start.
@Override
public void start() {
/**
* 1.Call router hub to mount commont *
*/
final Axis<Router> routerAxiser = Fn.poolThread(Pool.ROUTERS, () -> Instance.instance(RouterAxis.class));
Fn.flingUp(() -> {
// Set breaker for each server
ZeroAtomic.API_OPTS.forEach((port, option) -> {
/**
* Mount to api hub *
*/
final Axis<Router> axiser = Fn.poolThread(Pool.APIS, () -> Instance.instance(PointAxis.class, option, this.vertx));
/**
* Single server processing *
*/
final HttpServer server = this.vertx.createHttpServer(option);
/**
* Router *
*/
final Router router = Router.router(this.vertx);
routerAxiser.mount(router);
/**
* Api Logical *
*/
axiser.mount(router);
/**
* Listening *
*/
server.requestHandler(router::accept).listen();
{
registryServer(option);
}
});
}, LOGGER);
}
use of io.vertx.core.http.HttpServer in project vertx-openshift-it by cescoffier.
the class WebSessionVerticle method startHttpServer.
private Future<HttpServer> startHttpServer() {
Future<HttpServer> future = Future.future();
Router router = setupRouter();
vertx.createHttpServer().requestHandler(router::accept).listen(8080, future);
return future;
}
use of io.vertx.core.http.HttpServer in project vertx-openshift-it by cescoffier.
the class EventBusSenderVerticle method startHttpServer.
private Future<HttpServer> startHttpServer() {
Future<HttpServer> future = Future.future();
Router router = setupRouter();
vertx.createHttpServer().requestHandler(router::accept).listen(8080, future);
return future;
}
use of io.vertx.core.http.HttpServer in project vertx-openshift-it by cescoffier.
the class AsyncMapVerticle method startHttpServer.
private Future<HttpServer> startHttpServer() {
Future<HttpServer> future = Future.future();
Router router = setupRouter();
vertx.createHttpServer().requestHandler(router::accept).listen(8080, future);
return future;
}
use of io.vertx.core.http.HttpServer in project vertx-openshift-it by cescoffier.
the class CountersVerticle method startHttpServer.
private Future<HttpServer> startHttpServer() {
Future<HttpServer> future = Future.future();
Router router = setupRouter();
vertx.createHttpServer().requestHandler(router::accept).listen(8080, future);
return future;
}
Aggregations