io.vertx.servicediscovery.spi

## Interface ServicePublisher

-     public interface ServicePublisher

  The publisher is used by the importer to publish or unpublish records.
  Author:
    Julien Viet

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `Future<Record>` | `publish(Record record)` Like `publish(Record, Handler)` but returns a future of the result
    `void` | `publish(Record record, Handler<AsyncResult<Record>> resultHandler)` Publishes a record.
    `Future<Void>` | `unpublish(String id)` Like `unpublish(String, Handler)` but returns a future of the result
    `void` | `unpublish(String id, Handler<AsyncResult<Void>> resultHandler)` Un-publishes a record.
    `Future<Record>` | `update(Record record)` Like `update(Record, Handler)` but returns a future of the result
    `void` | `update(Record record, Handler<AsyncResult<Record>> resultHandler)` Updates an existing record.

- - ### Method Detail

    - #### publish

          void publish(Record record,
                       Handler<AsyncResult<Record>> resultHandler)

      Publishes a record.
      Parameters:
        `record` - the record
        `resultHandler` - handler called when the operation has completed (successfully or not). In case of success, the passed record has a registration id required to modify and un-register the service.

    - #### publish

          Future<Record> publish(Record record)

      Like `publish(Record, Handler)` but returns a future of the result

    - #### unpublish

          void unpublish(String id,
                         Handler<AsyncResult<Void>> resultHandler)

      Un-publishes a record.
      Parameters:
        `id` - the registration id
        `resultHandler` - handler called when the operation has completed (successfully or not).

    - #### unpublish

          Future<Void> unpublish(String id)

      Like `unpublish(String, Handler)` but returns a future of the result

    - #### update

          void update(Record record,
                      Handler<AsyncResult<Record>> resultHandler)

      Updates an existing record.
      Parameters:
        `record` - the record
        `resultHandler` - handler called when the operation has completed (successfully or not). In case of success, the passed record has a registration id required to modify and un-register the service.

    - #### update

          Future<Record> update(Record record)

      Like `update(Record, Handler)` but returns a future of the result

Copyright © 2022 Eclipse. All rights reserved.