Class ServicePublisher
- java.lang.Object
-
- io.vertx.mutiny.servicediscovery.spi.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 theoriginal
non Mutiny-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static TypeArg<ServicePublisher>
__TYPE_ARG
-
Constructor Summary
Constructors Constructor Description ServicePublisher(io.vertx.servicediscovery.spi.ServicePublisher delegate)
ServicePublisher(Object delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
io.vertx.servicediscovery.spi.ServicePublisher
getDelegate()
int
hashCode()
static ServicePublisher
newInstance(io.vertx.servicediscovery.spi.ServicePublisher arg)
io.smallrye.mutiny.Uni<io.vertx.servicediscovery.Record>
publish(io.vertx.servicediscovery.Record record)
Publishes a record.io.vertx.servicediscovery.Record
publishAndAwait(io.vertx.servicediscovery.Record record)
Blocking variant ofpublish(Record)
.void
publishAndForget(io.vertx.servicediscovery.Record record)
Variant ofpublish(Record)
that ignores the result of the operation.String
toString()
io.smallrye.mutiny.Uni<Void>
unpublish(String id)
Un-publishes a record.Void
unpublishAndAwait(String id)
Blocking variant ofunpublish(String)
.void
unpublishAndForget(String id)
Variant ofunpublish(String)
that ignores the result of the operation.io.smallrye.mutiny.Uni<io.vertx.servicediscovery.Record>
update(io.vertx.servicediscovery.Record record)
Updates an existing record.io.vertx.servicediscovery.Record
updateAndAwait(io.vertx.servicediscovery.Record record)
Blocking variant ofupdate(Record)
.void
updateAndForget(io.vertx.servicediscovery.Record record)
Variant ofupdate(Record)
that ignores the result of the operation.
-
-
-
Field Detail
-
__TYPE_ARG
public static final TypeArg<ServicePublisher> __TYPE_ARG
-
-
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()
-
publish
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 ofpublish(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 ofpublish(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 frompublish(Record)
but you don't need to compose it with other operations.- Parameters:
record
- the record
-
unpublish
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 ofunpublish(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 ofunpublish(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 fromunpublish(String)
but you don't need to compose it with other operations.- Parameters:
id
- the registration id
-
update
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 ofupdate(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 ofupdate(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 fromupdate(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)
-
-