Class ServicePublisher


  • public class ServicePublisher
    extends Object
    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.

    • Constructor Detail

      • ServicePublisher

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

        public ServicePublisher​(Object delegate)
    • Method Detail

      • getDelegate

        public io.vertx.servicediscovery.spi.ServicePublisher getDelegate()
      • 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)