vertx / io.vertx.reactivex.servicediscovery / ServiceReference / getAs

getAs

open fun <X : Any> getAs(x: Class<X>): X

Gets the object to access the service. It can be a proxy, a client or whatever object. The type depends on the service type and the server itself. This method wraps the service object into the desired type.

Parameters

x - the type of object

Return
the object to access the service wrapped to the given type