public <T> void getServiceProxy(JsonObject jsonFilter, Class<T> serviceClass, Handler<AsyncResult<T>> handler) { EventBusService.getServiceProxyWithJsonFilter(serviceDiscovery, jsonFilter, serviceClass, handler); } }
public static <T>java.lang.Object getServiceProxyWithJsonFilter(io.vertx.servicediscovery.types.EventBusService j_receiver, io.vertx.servicediscovery.ServiceDiscovery discovery, java.util.Map<String, Object> filter, java.lang.Class<java.lang.Object> clientClass, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Object>> resultHandler) { return io.vertx.core.impl.ConversionHelper.fromObject(io.vertx.servicediscovery.types.EventBusService.getServiceProxyWithJsonFilter(discovery, filter != null ? io.vertx.core.impl.ConversionHelper.toJsonObject(filter) : null, clientClass, resultHandler != null ? new io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Object>>() { public void handle(io.vertx.core.AsyncResult<java.lang.Object> ar) { resultHandler.handle(ar.map(event -> io.vertx.core.impl.ConversionHelper.fromObject(event))); } } : null)); } public static java.util.Map<String, Object> createRecord(io.vertx.servicediscovery.types.EventBusService j_receiver, java.lang.String name, java.lang.String address, java.lang.String classname) {
/** * Lookup for a service record and if found, retrieve it and return the service object (used to consume the service). * This is a convenient method to avoid explicit lookup and then retrieval of the service. This method requires to * have the <code>clientClass</code> set with the expected set of client. This is important for usages not using Java so * you can pass the expected type. * @param discovery the service discovery * @param filter the filter as json object * @param clientClass the client class * @param resultHandler the result handler * @return <code>null</code> - do not use */ public static <T> T getServiceProxyWithJsonFilter(io.vertx.rxjava.servicediscovery.ServiceDiscovery discovery, JsonObject filter, Class<T> clientClass, Handler<AsyncResult<T>> resultHandler) { T ret = (T)io.vertx.lang.rx.TypeArg.of(clientClass).wrap(io.vertx.servicediscovery.types.EventBusService.getServiceProxyWithJsonFilter(discovery.getDelegate(), filter, io.vertx.lang.rxjava.Helper.unwrap(clientClass), new Handler<AsyncResult<T>>() { public void handle(AsyncResult<T> ar) { if (ar.succeeded()) { resultHandler.handle(io.vertx.core.Future.succeededFuture((T)io.vertx.lang.rx.TypeArg.of(clientClass).wrap(ar.result()))); } else { resultHandler.handle(io.vertx.core.Future.failedFuture(ar.cause())); } } })); return ret; }
/** * Lookup for a service record and if found, retrieve it and return the service object (used to consume the service). * This is a convenient method to avoid explicit lookup and then retrieval of the service. This method requires to * have the <code>clientClass</code> set with the expected set of client. This is important for usages not using Java so * you can pass the expected type. * @param discovery the service discovery * @param filter the filter as json object * @param clientClass the client class * @param resultHandler the result handler * @return <code>null</code> - do not use */ public static <T> T getServiceProxyWithJsonFilter(io.vertx.rxjava.servicediscovery.ServiceDiscovery discovery, JsonObject filter, Class<T> clientClass, Handler<AsyncResult<T>> resultHandler) { T ret = (T)io.vertx.lang.rx.TypeArg.of(clientClass).wrap(io.vertx.servicediscovery.types.EventBusService.getServiceProxyWithJsonFilter(discovery.getDelegate(), filter, io.vertx.lang.rxjava.Helper.unwrap(clientClass), new Handler<AsyncResult<T>>() { public void handle(AsyncResult<T> ar) { if (ar.succeeded()) { resultHandler.handle(io.vertx.core.Future.succeededFuture((T)io.vertx.lang.rx.TypeArg.of(clientClass).wrap(ar.result()))); } else { resultHandler.handle(io.vertx.core.Future.failedFuture(ar.cause())); } } })); return ret; }