public static void init(io.vertx.servicediscovery.spi.ServiceExporter j_receiver, io.vertx.core.Vertx vertx, io.vertx.servicediscovery.spi.ServicePublisher publisher, java.util.Map<String, Object> configuration, io.vertx.core.Future<java.lang.Void> future) { j_receiver.init(vertx, publisher, configuration != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(configuration) : null, future); } public static void onPublish(io.vertx.servicediscovery.spi.ServiceExporter j_receiver, java.util.Map<String, Object> record) {
@Override public ServiceDiscovery registerServiceExporter(ServiceExporter exporter, JsonObject configuration, Handler<AsyncResult<Void>> completionHandler) { JsonObject conf; if (configuration == null) { conf = new JsonObject(); } else { conf = configuration; } Future<Void> completed = Future.future(); completed.setHandler( ar -> { if (ar.failed()) { LOGGER.error("Cannot start the service importer " + exporter, ar.cause()); if (completionHandler != null) { completionHandler.handle(Future.failedFuture(ar.cause())); } } else { exporters.add(exporter); LOGGER.info("Service exporter " + exporter + " started"); if (completionHandler != null) { completionHandler.handle(Future.succeededFuture(null)); } } } ); exporter.init(vertx, this, conf, completed); return this; }
@Override public ServiceDiscovery registerServiceExporter(ServiceExporter exporter, JsonObject configuration, Handler<AsyncResult<Void>> completionHandler) { JsonObject conf; if (configuration == null) { conf = new JsonObject(); } else { conf = configuration; } Future<Void> completed = Future.future(); completed.setHandler( ar -> { if (ar.failed()) { LOGGER.error("Cannot start the service importer " + exporter, ar.cause()); if (completionHandler != null) { completionHandler.handle(Future.failedFuture(ar.cause())); } } else { exporters.add(exporter); LOGGER.info("Service exporter " + exporter + " started"); if (completionHandler != null) { completionHandler.handle(Future.succeededFuture(null)); } } } ); exporter.init(vertx, this, conf, completed); return this; }
/** * Starts the exporter. * @param vertx the vertx instance * @param publisher the service discovery instance * @param configuration the bridge configuration if any * @param future a future on which the bridge must report the completion of the starting */ public void init(io.vertx.rxjava.core.Vertx vertx, io.vertx.rxjava.servicediscovery.spi.ServicePublisher publisher, JsonObject configuration, io.vertx.rxjava.core.Future<Void> future) { delegate.init(vertx.getDelegate(), publisher.getDelegate(), configuration, future.getDelegate()); }
/** * Starts the exporter. * @param vertx the vertx instance * @param publisher the service discovery instance * @param configuration the bridge configuration if any * @param future a future on which the bridge must report the completion of the starting */ public void init(io.vertx.rxjava.core.Vertx vertx, io.vertx.rxjava.servicediscovery.spi.ServicePublisher publisher, JsonObject configuration, io.vertx.rxjava.core.Future<Void> future) { delegate.init(vertx.getDelegate(), publisher.getDelegate(), configuration, future.getDelegate()); }