Class MessageProducer<T>

java.lang.Object
io.vertx.reactivex.core.eventbus.MessageProducer<T>
All Implemented Interfaces:
io.vertx.lang.rx.RxDelegate

public class MessageProducer<T> extends Object implements io.vertx.lang.rx.RxDelegate
Represents a stream of message that can be written to.

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

  • Field Details

    • __TYPE_ARG

      public static final io.vertx.lang.rx.TypeArg<MessageProducer> __TYPE_ARG
    • __typeArg_0

      public final io.vertx.lang.rx.TypeArg<T> __typeArg_0
  • Constructor Details

    • MessageProducer

      public MessageProducer(MessageProducer delegate)
    • MessageProducer

      public MessageProducer(Object delegate, io.vertx.lang.rx.TypeArg<T> typeArg_0)
  • 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 MessageProducer getDelegate()
      Specified by:
      getDelegate in interface io.vertx.lang.rx.RxDelegate
    • deliveryOptions

      public MessageProducer<T> deliveryOptions(DeliveryOptions options)
      Update the delivery options of this producer.
      Parameters:
      options - the new options
      Returns:
      this producer object
    • address

      public String address()
      Returns:
      The address to which the producer produces messages.
    • write

      public Future<Void> write(T body)
      Write a message to the event-bus, either sending or publishing. The returned completion depends on the producer type:
      • send or request: the future is completed successfully if the message has been written; otherwise, the future is failed
      • publish: the future is failed if there is no recipient; otherwise, the future is completed successfully
      In any case, a successfully completed is not a delivery guarantee.
      Parameters:
      body - the message body
      Returns:
    • rxWrite

      public Completable rxWrite(T body)
      Write a message to the event-bus, either sending or publishing. The returned completion depends on the producer type:
      • send or request: the future is completed successfully if the message has been written; otherwise, the future is failed
      • publish: the future is failed if there is no recipient; otherwise, the future is completed successfully
      In any case, a successfully completed is not a delivery guarantee.
      Parameters:
      body - the message body
      Returns:
    • close

      public Future<Void> close()
      Closes the producer, this method should be called when the message producer is not used anymore.
      Returns:
      a future completed with the result
    • rxClose

      public Completable rxClose()
      Closes the producer, this method should be called when the message producer is not used anymore.
      Returns:
      a future completed with the result
    • newInstance

      public static <T> MessageProducer<T> newInstance(MessageProducer arg)
    • newInstance

      public static <T> MessageProducer<T> newInstance(MessageProducer arg, io.vertx.lang.rx.TypeArg<T> __typeArg_T)