/** * Returns the node's registered services * @param node node name * @param resultHandler will be provided with list of services * @return reference to this, for fluency */ public io.vertx.rxjava.ext.consul.ConsulClient catalogNodeServices(String node, Handler<AsyncResult<ServiceList>> resultHandler) { delegate.catalogNodeServices(node, resultHandler); return this; }
@Test public void catalogNodeServicesBlocking() throws InterruptedException { testServicesBlocking(h -> ctx.readClient().catalogNodeServices(ctx.nodeName(), h), (opts, h) -> ctx.readClient().catalogNodeServicesWithOptions(ctx.nodeName(), opts, h)); }
/** * Returns the node's registered services * @param node node name * @param resultHandler will be provided with list of services * @return reference to this, for fluency */ public io.vertx.rxjava.ext.consul.ConsulClient catalogNodeServices(String node, Handler<AsyncResult<ServiceList>> resultHandler) { delegate.catalogNodeServices(node, resultHandler); return this; }
@Override public ConsulService catalogNodeServices(String node, Handler<AsyncResult<ServiceList>> resultHandler) { consulClient.catalogNodeServices(node, resultHandler); return this; }
public static io.vertx.ext.consul.ConsulClient catalogNodeServices(io.vertx.ext.consul.ConsulClient j_receiver, java.lang.String node, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.Map<String, Object>>> resultHandler) { io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.catalogNodeServices(node, resultHandler != null ? new io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.ext.consul.ServiceList>>() { public void handle(io.vertx.core.AsyncResult<io.vertx.ext.consul.ServiceList> ar) { resultHandler.handle(ar.map(event -> event != null ? io.vertx.core.impl.ConversionHelper.fromJsonObject(event.toJson()) : null)); } } : null)); return j_receiver; } public static io.vertx.ext.consul.ConsulClient catalogNodeServicesWithOptions(io.vertx.ext.consul.ConsulClient j_receiver, java.lang.String node, java.util.Map<String, Object> options, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.Map<String, Object>>> resultHandler) {
tc.assertEquals(c.getId(), "service:" + serviceName); tc.assertEquals(c.getNotes(), opts.getCheckOptions().getNotes()); ctx.writeClient().catalogNodeServices(ctx.nodeName(), tc.asyncAssertSuccess(nodeServices -> { tc.assertEquals(2, nodeServices.getList().size()); checkService(tc, nodeServices.getList(), serviceName, opts);