private void addHandlers(HttpServerImpl server, ContextInternal context) { server.httpHandlerMgr.addHandler( new HttpHandlers( this, requestStream.handler(), wsStream.handler(), connectionHandler, exceptionHandler == null ? DEFAULT_EXCEPTION_HANDLER : exceptionHandler) , context); }
handlerManager.addHandler(new Handlers(this, handler, exceptionHandler), listenContext); VertxMetrics metrics = vertx.metricsSPI(); this.metrics = metrics != null ? metrics.createNetServerMetrics(options, new SocketAddressImpl(id.port, id.host)) : null; actualServer.handlerManager.addHandler(new Handlers(this, handler, exceptionHandler), listenContext);
private void addHandlers(HttpServerImpl server, ContextInternal context) { server.httpHandlerMgr.addHandler( new HttpHandlers( this, requestStream.handler(), wsStream.handler(), connectionHandler, exceptionHandler == null ? DEFAULT_EXCEPTION_HANDLER : exceptionHandler) , context); }
handlerManager.addHandler(new Handlers(this, handler, exceptionHandler), listenContext); VertxMetrics metrics = vertx.metricsSPI(); this.metrics = metrics != null ? metrics.createNetServerMetrics(options, new SocketAddressImpl(id.port, id.host)) : null; actualServer.handlerManager.addHandler(new Handlers(this, handler, exceptionHandler), listenContext);
void start(ContextInternal context, Handler<AsyncResult<Void>> completionHandler) { boolean start = count.getAndIncrement() == 0; context.runOnContext(v -> { if (contextLocal.get() == null) { contextLocal.set(new ArrayList<>()); } manager.addHandler("foo", context); contextLocal.get().add(context); if (start) { context.executeBlocking(v2 -> { try { server.start(); v2.complete(); } catch (IOException e) { v2.fail(e); } }, completionHandler); } else { completionHandler.handle(Future.succeededFuture()); } }); }