Class MessageSource


  • public class MessageSource
    extends Object
    Service type for data producer. Providers are publishing data to a specific event bus address.

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

    • Constructor Detail

      • MessageSource

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

        public MessageSource​(Object delegate)
    • Method Detail

      • hashCode

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

        public io.vertx.servicediscovery.types.MessageSource getDelegate()
      • createRecord

        public static io.vertx.servicediscovery.Record createRecord​(String name,
                                                                    String address,
                                                                    String type,
                                                                    io.vertx.core.json.JsonObject metadata)
        Create a record representing a data producer.
        Parameters:
        name - the name of the service
        address - the address on which the data is sent
        type - the type of payload (fully qualified name of the class)
        metadata - additional metadata
        Returns:
        the created record
      • getConsumer

        public static <T> void getConsumer​(ServiceDiscovery discovery,
                                           io.vertx.core.json.JsonObject filter,
                                           io.vertx.core.Handler<io.vertx.core.AsyncResult<MessageConsumer<T>>> resultHandler)
        Convenient method that looks for a message source and provides the configured . The async result is marked as failed is there are no matching services, or if the lookup fails.
        Parameters:
        discovery - The service discovery instance
        filter - The filter, optional
        resultHandler - The result handler
      • getConsumer

        public static <T> void getConsumer​(ServiceDiscovery discovery,
                                           io.vertx.core.json.JsonObject filter)
        Convenient method that looks for a message source and provides the configured . The async result is marked as failed is there are no matching services, or if the lookup fails.
        Parameters:
        discovery - The service discovery instance
        filter - The filter, optional
      • rxGetConsumer

        public static <T> rx.Single<MessageConsumer<T>> rxGetConsumer​(ServiceDiscovery discovery,
                                                                      io.vertx.core.json.JsonObject filter)
        Convenient method that looks for a message source and provides the configured . The async result is marked as failed is there are no matching services, or if the lookup fails.
        Parameters:
        discovery - The service discovery instance
        filter - The filter, optional
        Returns:
      • getConsumer

        public static <T> void getConsumer​(ServiceDiscovery discovery,
                                           Function<io.vertx.servicediscovery.Record,​Boolean> filter,
                                           io.vertx.core.Handler<io.vertx.core.AsyncResult<MessageConsumer<T>>> resultHandler)
        Convenient method that looks for a message source and provides the configured . The async result is marked as failed is there are no matching services, or if the lookup fails.
        Parameters:
        discovery - The service discovery instance
        filter - The filter, must not be null
        resultHandler - The result handler
      • getConsumer

        public static <T> void getConsumer​(ServiceDiscovery discovery,
                                           Function<io.vertx.servicediscovery.Record,​Boolean> filter)
        Convenient method that looks for a message source and provides the configured . The async result is marked as failed is there are no matching services, or if the lookup fails.
        Parameters:
        discovery - The service discovery instance
        filter - The filter, must not be null
      • rxGetConsumer

        public static <T> rx.Single<MessageConsumer<T>> rxGetConsumer​(ServiceDiscovery discovery,
                                                                      Function<io.vertx.servicediscovery.Record,​Boolean> filter)
        Convenient method that looks for a message source and provides the configured . The async result is marked as failed is there are no matching services, or if the lookup fails.
        Parameters:
        discovery - The service discovery instance
        filter - The filter, must not be null
        Returns:
      • newInstance

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