Class MessageSource

java.lang.Object
io.vertx.rxjava3.servicediscovery.types.MessageSource
All Implemented Interfaces:
io.vertx.lang.rx.RxDelegate

public class MessageSource extends Object implements io.vertx.lang.rx.RxDelegate
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.

  • Field Details

  • Constructor Details

    • MessageSource

      public MessageSource(MessageSource delegate)
    • MessageSource

      public MessageSource(Object delegate)
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

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

      public MessageSource getDelegate()
      Specified by:
      getDelegate in interface io.vertx.lang.rx.RxDelegate
    • createRecord

      public static Record createRecord(String name, String address, String type, 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
    • createRecord

      public static Record createRecord(String name, String address, String type)
      Same as createRecord(String, String, String, JsonObject) without additional metadata.
      Parameters:
      name - the name of the service
      address - the address on which the data is sent
      type - the type of payload
      Returns:
      the created record
    • createRecord

      public static Record createRecord(String name, String address)
      Same as createRecord(String, String, String, JsonObject) without additional metadata, and no type for the payload.
      Parameters:
      name - the name of the service
      address - the address on which the data is sent.
      Returns:
      the created record
    • getConsumer

      public static <T> Single<MessageConsumer<T>> getConsumer(ServiceDiscovery discovery, 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:
      a future notified with the client
    • rxGetConsumer

      public static <T> Single<MessageConsumer<T>> rxGetConsumer(ServiceDiscovery discovery, 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:
      a future notified with the client
    • getConsumer

      public static <T> Single<MessageConsumer<T>> getConsumer(ServiceDiscovery discovery, Function<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:
      a future notified with the client
    • rxGetConsumer

      public static <T> Single<MessageConsumer<T>> rxGetConsumer(ServiceDiscovery discovery, Function<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:
      a future notified with the client
    • newInstance

      public static MessageSource newInstance(MessageSource arg)