Package: io.vertx.groovy.servicediscovery.spi

## [Groovy] Class ServicePublisher

- io.vertx.groovy.servicediscovery.spi.ServicePublisher

- The publisher is used by the importer to publish or unpublish records.

- - ### Constructor Summary

    Constructors
    Constructor and description
    `ServicePublisher (java.lang.Object delegate)`

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `java.lang.Object` | `getDelegate()`
    `void` | `publish(java.util.Map<java.lang.String, java.lang.Object> record = [:], io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.Map<java.lang.String, java.lang.Object>>> resultHandler)` Publishes a record.
    `void` | `unpublish(java.lang.String id, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> resultHandler)` Un-publishes a record.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class java.lang.Object` | `java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()`

- - ### Constructor Detail

    - #### ServicePublisher(java.lang.Object delegate)

  - ### Method Detail

    - #### java.lang.Object getDelegate()

    - #### void publish(java.util.Map<java.lang.String, java.lang.Object> record = [:], io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.Map<java.lang.String, java.lang.Object>>> resultHandler)

      Publishes a record.

      Parameters:
        `record` - the record (see 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.

    - #### void unpublish(java.lang.String id, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> resultHandler)

      Un-publishes a record.

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