Class EventBusService


  • public class EventBusService
    extends Object
    for event bus services (service proxies). Consumers receive a service proxy to use the service.

    NOTE: This class has been automatically generated from the original non Mutiny-ified interface using Vert.x codegen.

    • Constructor Detail

      • EventBusService

        public EventBusService​(io.vertx.servicediscovery.types.EventBusService delegate)
      • EventBusService

        public EventBusService​(Object delegate)
    • Method Detail

      • getDelegate

        public io.vertx.servicediscovery.types.EventBusService getDelegate()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • createRecord

        public static io.vertx.servicediscovery.Record createRecord​(String name,
                                                                    String address,
                                                                    String itf,
                                                                    io.vertx.core.json.JsonObject metadata)
        Parameters:
        name - the name of the service.
        address - the event bus address on which the service available
        itf - the Java interface (name)
        metadata - the metadata
        Returns:
        the created record
      • getServiceProxy

        @CheckReturnValue
        public static <T> io.smallrye.mutiny.Uni<T> getServiceProxy​(ServiceDiscovery discovery,
                                                                    Function<io.vertx.servicediscovery.Record,​Boolean> filter,
                                                                    Class<T> clientClass)
        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 clientClass set with the expected set of client. This is important for usages not using Java so you can pass the expected type.

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        discovery - the service discovery
        filter - the filter
        clientClass - the client class
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • getServiceProxyAndAwait

        public static <T> T getServiceProxyAndAwait​(ServiceDiscovery discovery,
                                                    Function<io.vertx.servicediscovery.Record,​Boolean> filter,
                                                    Class<T> clientClass)
        Blocking variant of getServiceProxy(io.vertx.mutiny.servicediscovery.ServiceDiscovery,Function,Class).

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Parameters:
        discovery - the service discovery
        filter - the filter
        clientClass - the client class
        Returns:
        the T instance produced by the operation.
      • getServiceProxy

        @CheckReturnValue
        public static <T> io.smallrye.mutiny.Uni<T> getServiceProxy​(ServiceDiscovery discovery,
                                                                    Function<io.vertx.servicediscovery.Record,​Boolean> filter,
                                                                    Class<T> clientClass,
                                                                    io.vertx.core.json.JsonObject conf)
        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 clientClass set with the expected set of client. This is important for usages not using Java so you can pass the expected type.

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        discovery - the service discovery
        filter - the filter
        clientClass - the client class
        conf - the configuration for message delivery
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • getServiceProxyAndAwait

        public static <T> T getServiceProxyAndAwait​(ServiceDiscovery discovery,
                                                    Function<io.vertx.servicediscovery.Record,​Boolean> filter,
                                                    Class<T> clientClass,
                                                    io.vertx.core.json.JsonObject conf)
        Blocking variant of getServiceProxy(io.vertx.mutiny.servicediscovery.ServiceDiscovery,Function,Class,JsonObject).

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Parameters:
        discovery - the service discovery
        filter - the filter
        clientClass - the client class
        conf - the configuration for message delivery
        Returns:
        the T instance produced by the operation.
      • getServiceProxyWithJsonFilter

        @CheckReturnValue
        public static <T> io.smallrye.mutiny.Uni<T> getServiceProxyWithJsonFilter​(ServiceDiscovery discovery,
                                                                                  io.vertx.core.json.JsonObject filter,
                                                                                  Class<T> clientClass)
        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 clientClass set with the expected set of client. This is important for usages not using Java so you can pass the expected type.

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        discovery - the service discovery
        filter - the filter as json object
        clientClass - the client class
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • getServiceProxyWithJsonFilterAndAwait

        public static <T> T getServiceProxyWithJsonFilterAndAwait​(ServiceDiscovery discovery,
                                                                  io.vertx.core.json.JsonObject filter,
                                                                  Class<T> clientClass)
        Blocking variant of getServiceProxyWithJsonFilter(io.vertx.mutiny.servicediscovery.ServiceDiscovery,JsonObject,Class).

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Parameters:
        discovery - the service discovery
        filter - the filter as json object
        clientClass - the client class
        Returns:
        the T instance produced by the operation.
      • getServiceProxyWithJsonFilter

        @CheckReturnValue
        public static <T> io.smallrye.mutiny.Uni<T> getServiceProxyWithJsonFilter​(ServiceDiscovery discovery,
                                                                                  io.vertx.core.json.JsonObject filter,
                                                                                  Class<T> clientClass,
                                                                                  io.vertx.core.json.JsonObject conf)
        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 clientClass set with the expected set of client. This is important for usages not using Java so you can pass the expected type.

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        discovery - the service discovery
        filter - the filter as json object
        clientClass - the client class
        conf - the configuration for message delivery
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • getServiceProxyWithJsonFilterAndAwait

        public static <T> T getServiceProxyWithJsonFilterAndAwait​(ServiceDiscovery discovery,
                                                                  io.vertx.core.json.JsonObject filter,
                                                                  Class<T> clientClass,
                                                                  io.vertx.core.json.JsonObject conf)
        Blocking variant of getServiceProxyWithJsonFilter(io.vertx.mutiny.servicediscovery.ServiceDiscovery,JsonObject,Class,JsonObject).

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Parameters:
        discovery - the service discovery
        filter - the filter as json object
        clientClass - the client class
        conf - the configuration for message delivery
        Returns:
        the T instance produced by the operation.
      • createRecord

        public static io.vertx.servicediscovery.Record createRecord​(String name,
                                                                    String address,
                                                                    String classname)
        Parameters:
        name - the service name
        address - the address
        classname - the payload class
        Returns:
        the record
      • newInstance

        public static EventBusService newInstance​(io.vertx.servicediscovery.types.EventBusService arg)