Class ServicePublisher

java.lang.Object
io.vertx.mutiny.servicediscovery.spi.ServicePublisher
All Implemented Interfaces:
MutinyDelegate

public class ServicePublisher extends Object implements MutinyDelegate
The publisher is used by the importer to publish or unpublish records.

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

  • Field Details

  • Constructor Details

    • ServicePublisher

      public ServicePublisher(io.vertx.servicediscovery.spi.ServicePublisher delegate)
    • ServicePublisher

      public ServicePublisher(Object delegate)
  • Method Details

    • getDelegate

      public io.vertx.servicediscovery.spi.ServicePublisher getDelegate()
      Specified by:
      getDelegate in interface MutinyDelegate
      Returns:
      the delegate used by this Mutiny object of generated type
    • 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
    • publish

      @CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.servicediscovery.Record> publish(io.vertx.servicediscovery.Record record)
      Publishes a record.

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

      Parameters:
      record - the record
      Returns:
      the uni firing the result of the operation when completed, or a failure if the operation failed.
    • publishAndAwait

      public io.vertx.servicediscovery.Record publishAndAwait(io.vertx.servicediscovery.Record record)
      Blocking variant of publish(Record).

      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:
      record - the record
      Returns:
      the Record instance produced by the operation.
    • publishAndForget

      public void publishAndForget(io.vertx.servicediscovery.Record record)
      Variant of publish(Record) that ignores the result of the operation.

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

      Parameters:
      record - the record
    • unpublish

      @CheckReturnValue public io.smallrye.mutiny.Uni<Void> unpublish(String id)
      Un-publishes a record.

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

      Parameters:
      id - the registration id
      Returns:
      the uni firing the result of the operation when completed, or a failure if the operation failed.
    • unpublishAndAwait

      public Void unpublishAndAwait(String id)
      Blocking variant of unpublish(String).

      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:
      id - the registration id
      Returns:
      the Void instance produced by the operation.
    • unpublishAndForget

      public void unpublishAndForget(String id)
      Variant of unpublish(String) that ignores the result of the operation.

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

      Parameters:
      id - the registration id
    • update

      @CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.servicediscovery.Record> update(io.vertx.servicediscovery.Record record)
      Updates an existing record.

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

      Parameters:
      record - the record
      Returns:
      the uni firing the result of the operation when completed, or a failure if the operation failed.
    • updateAndAwait

      public io.vertx.servicediscovery.Record updateAndAwait(io.vertx.servicediscovery.Record record)
      Blocking variant of update(Record).

      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:
      record - the record
      Returns:
      the Record instance produced by the operation.
    • updateAndForget

      public void updateAndForget(io.vertx.servicediscovery.Record record)
      Variant of update(Record) that ignores the result of the operation.

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

      Parameters:
      record - the record
    • newInstance

      public static ServicePublisher newInstance(io.vertx.servicediscovery.spi.ServicePublisher arg)