diff --git a/service-proxy-examples/service-provider/src/main/java/io/vertx/examples/service/ProcessorService.java b/service-proxy-examples/service-provider/src/main/java/io/vertx/examples/service/ProcessorService.java index 6b8394698..d99f07c32 100644 --- a/service-proxy-examples/service-provider/src/main/java/io/vertx/examples/service/ProcessorService.java +++ b/service-proxy-examples/service-provider/src/main/java/io/vertx/examples/service/ProcessorService.java @@ -7,6 +7,7 @@ import io.vertx.core.Vertx; import io.vertx.core.json.JsonObject; import io.vertx.examples.service.impl.ProcessorServiceImpl; +import io.vertx.serviceproxy.ProxyHelper; /** * The service interface. @@ -21,9 +22,11 @@ static ProcessorService create(Vertx vertx) { } static ProcessorService createProxy(Vertx vertx, String address) { + return ProxyHelper.createProxy(ProcessorService.class, vertx, address); + // Alternatively, you can create the proxy directly using: + // return new ProcessorServiceVertxEBProxy(vertx, address); // The name of the class to instantiate is the service interface + `VertxEBProxy`. // This class is generated during the compilation - return new ProcessorServiceVertxEBProxy(vertx, address); } // The service methods