Class AmqpReceiver

java.lang.Object
io.vertx.mutiny.amqp.AmqpReceiver
All Implemented Interfaces:
io.vertx.mutiny.core.streams.ReadStream<AmqpMessage>, io.vertx.mutiny.core.streams.StreamBase

public class AmqpReceiver extends Object implements io.vertx.mutiny.core.streams.ReadStream<AmqpMessage>
Interface used to consume AMQP message as a stream of message. Back pressure is implemented using AMQP credits.

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

  • Field Details

    • __TYPE_ARG

      public static final io.smallrye.mutiny.vertx.TypeArg<AmqpReceiver> __TYPE_ARG
  • Constructor Details

    • AmqpReceiver

      public AmqpReceiver(io.vertx.amqp.AmqpReceiver delegate)
    • AmqpReceiver

      public AmqpReceiver(Object delegate)
  • Method Details

    • getDelegate

      public io.vertx.amqp.AmqpReceiver getDelegate()
      Specified by:
      getDelegate in interface io.vertx.mutiny.core.streams.ReadStream<AmqpMessage>
      Specified by:
      getDelegate in interface io.vertx.mutiny.core.streams.StreamBase
    • 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
    • pipe

      public io.vertx.mutiny.core.streams.Pipe<AmqpMessage> pipe()
      Specified by:
      pipe in interface io.vertx.mutiny.core.streams.ReadStream<AmqpMessage>
    • pipeTo

      @CheckReturnValue public io.smallrye.mutiny.Uni<Void> pipeTo(io.vertx.mutiny.core.streams.WriteStream<AmqpMessage> dst)
      Specified by:
      pipeTo in interface io.vertx.mutiny.core.streams.ReadStream<AmqpMessage>
    • pipeToAndAwait

      public Void pipeToAndAwait(io.vertx.mutiny.core.streams.WriteStream<AmqpMessage> dst)
      Specified by:
      pipeToAndAwait in interface io.vertx.mutiny.core.streams.ReadStream<AmqpMessage>
    • pipeToAndForget

      public void pipeToAndForget(io.vertx.mutiny.core.streams.WriteStream<AmqpMessage> dst)
      Specified by:
      pipeToAndForget in interface io.vertx.mutiny.core.streams.ReadStream<AmqpMessage>
    • exceptionHandler

      public AmqpReceiver exceptionHandler(Consumer<Throwable> handler)
      Specified by:
      exceptionHandler in interface io.vertx.mutiny.core.streams.ReadStream<AmqpMessage>
      Specified by:
      exceptionHandler in interface io.vertx.mutiny.core.streams.StreamBase
    • handler

      public AmqpReceiver handler(Consumer<AmqpMessage> handler)
      Specified by:
      handler in interface io.vertx.mutiny.core.streams.ReadStream<AmqpMessage>
    • pause

      public AmqpReceiver pause()
      Specified by:
      pause in interface io.vertx.mutiny.core.streams.ReadStream<AmqpMessage>
    • resume

      public AmqpReceiver resume()
      Specified by:
      resume in interface io.vertx.mutiny.core.streams.ReadStream<AmqpMessage>
    • fetch

      public AmqpReceiver fetch(long amount)
      Specified by:
      fetch in interface io.vertx.mutiny.core.streams.ReadStream<AmqpMessage>
    • endHandler

      public AmqpReceiver endHandler(Runnable endHandler)
      Specified by:
      endHandler in interface io.vertx.mutiny.core.streams.ReadStream<AmqpMessage>
    • address

      public String address()
      Returns:
      the address, not null
    • close

      @CheckReturnValue public io.smallrye.mutiny.Uni<Void> close()
      Closes the receiver.

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

      Returns:
      the uni firing the result of the operation when completed, or a failure if the operation failed.
    • closeAndAwait

      public Void closeAndAwait()
      Blocking variant of close().

      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).

      Returns:
      the Void instance produced by the operation.
    • closeAndForget

      public void closeAndForget()
      Variant of close() that ignores the result of the operation.

      This method subscribes on the result of close(), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from close() but you don't need to compose it with other operations.

    • connection

      public AmqpConnection connection()
      Returns:
      the connection having created the receiver.
    • unwrap

      public io.vertx.proton.ProtonReceiver unwrap()
      Returns:
      the underlying ProtonReceiver.
    • toMulti

      @CheckReturnValue public io.smallrye.mutiny.Multi<AmqpMessage> toMulti()
      Specified by:
      toMulti in interface io.vertx.mutiny.core.streams.ReadStream<AmqpMessage>
    • toBlockingIterable

      public Iterable<AmqpMessage> toBlockingIterable()
    • toBlockingStream

      public Stream<AmqpMessage> toBlockingStream()
    • newInstance

      public static AmqpReceiver newInstance(io.vertx.amqp.AmqpReceiver arg)