public class Watch<T> extends Object
Handler with WatchResult is invoked.
All errors, except java.util.concurrent.TimeoutException, will be handled, with resubscribing with a progressive delay.
All timeout errors will be ignored, with resubscribing without any delay.
As an example, you could watch the status of health checks and notify when a check is critical.
NOTE: This class has been automatically generated from the original non RX-ified interface using Vert.x codegen.| Modifier and Type | Field and Description |
|---|---|
static io.vertx.lang.rx.TypeArg<Watch> |
__TYPE_ARG |
io.vertx.lang.rx.TypeArg<T> |
__typeArg_0 |
| Constructor and Description |
|---|
Watch(Object delegate,
io.vertx.lang.rx.TypeArg<T> typeArg_0) |
Watch(Watch delegate) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
static Watch<EventList> |
events(String event,
Vertx vertx)
Creates
Watch to monitoring the custom user events. |
static Watch<EventList> |
events(String event,
Vertx vertx,
ConsulClientOptions options)
Creates
Watch to monitoring the custom user events. |
Watch |
getDelegate() |
int |
hashCode() |
static Watch<KeyValue> |
key(String key,
Vertx vertx)
Creates
Watch to monitoring a specific key in the KV store. |
static Watch<KeyValue> |
key(String key,
Vertx vertx,
ConsulClientOptions options)
Creates
Watch to monitoring a specific key in the KV store. |
static Watch<KeyValueList> |
keyPrefix(String keyPrefix,
Vertx vertx)
Creates
Watch to monitoring a prefix of keys in the KV store. |
static Watch<KeyValueList> |
keyPrefix(String keyPrefix,
Vertx vertx,
ConsulClientOptions options)
Creates
Watch to monitoring a prefix of keys in the KV store. |
static <T> Watch<T> |
newInstance(Watch arg) |
static <T> Watch<T> |
newInstance(Watch arg,
io.vertx.lang.rx.TypeArg<T> __typeArg_T) |
static Watch<NodeList> |
nodes(Vertx vertx)
Creates
Watch to monitoring the list of available nodes. |
static Watch<NodeList> |
nodes(Vertx vertx,
ConsulClientOptions options)
Creates
Watch to monitoring the list of available nodes. |
static Watch<ServiceEntryList> |
service(String service,
Vertx vertx)
Creates
Watch to monitoring the nodes providing the service. |
static Watch<ServiceEntryList> |
service(String service,
Vertx vertx,
ConsulClientOptions options)
Creates
Watch to monitoring the nodes providing the service. |
static Watch<ServiceList> |
services(Vertx vertx)
Creates
Watch to monitoring the list of available services. |
static Watch<ServiceList> |
services(Vertx vertx,
ConsulClientOptions options)
Creates
Watch to monitoring the list of available services. |
Watch<T> |
setHandler(Handler<WatchResult<T>> handler)
Set the result handler.
|
Watch<T> |
start()
Start this
Watch |
void |
stop()
Stop the watch and release its resources
|
String |
toString() |
public static final io.vertx.lang.rx.TypeArg<Watch> __TYPE_ARG
public final io.vertx.lang.rx.TypeArg<T> __typeArg_0
public Watch(Watch delegate)
public Watch getDelegate()
public static Watch<KeyValue> key(String key, Vertx vertx)
Watch to monitoring a specific key in the KV store.
The underlying Consul client will be created with default options.
This maps to the /v1/kv/ API internally.key - the keyvertx - the Vertx instanceWatch instancepublic static Watch<KeyValue> key(String key, Vertx vertx, ConsulClientOptions options)
Watch to monitoring a specific key in the KV store.
This maps to the /v1/kv/ API internally.key - the keyvertx - the Vertx instanceoptions - the options to create underlying Consul clientWatch instancepublic static Watch<KeyValueList> keyPrefix(String keyPrefix, Vertx vertx)
Watch to monitoring a prefix of keys in the KV store.
The underlying Consul client will be created with default options.
This maps to the /v1/kv/ API internally.keyPrefix - the keyvertx - the Vertx instanceWatch instancepublic static Watch<KeyValueList> keyPrefix(String keyPrefix, Vertx vertx, ConsulClientOptions options)
Watch to monitoring a prefix of keys in the KV store.
This maps to the /v1/kv/ API internally.keyPrefix - the keyvertx - the Vertx instanceoptions - the options to create underlying Consul clientWatch instancepublic static Watch<ServiceList> services(Vertx vertx)
Watch to monitoring the list of available services.
The underlying Consul client will be created with default options.
This maps to the /v1/catalog/services API internally.vertx - the Vertx instanceWatch instancepublic static Watch<ServiceList> services(Vertx vertx, ConsulClientOptions options)
Watch to monitoring the list of available services.
This maps to the /v1/catalog/services API internally.vertx - the Vertx instanceoptions - the options to create underlying Consul clientWatch instancepublic static Watch<ServiceEntryList> service(String service, Vertx vertx)
Watch to monitoring the nodes providing the service.
Nodes will be sorted by distance from the consul agent.
The underlying Consul client will be created with default options.
This maps to the /v1/health/service/<service> API internally.service - the service namevertx - the Vertx instanceWatch instancepublic static Watch<ServiceEntryList> service(String service, Vertx vertx, ConsulClientOptions options)
Watch to monitoring the nodes providing the service.
Nodes will be sorted by distance from the consul agent.
This maps to the /v1/health/service/<service> API internally.service - the service namevertx - the Vertx instanceoptions - the options to create underlying Consul clientWatch instancepublic static Watch<EventList> events(String event, Vertx vertx)
Watch to monitoring the custom user events.
The underlying Consul client will be created with default options.
This maps to the /v1/event/list API internally.event - the event namevertx - the Vertx instanceWatch instancepublic static Watch<EventList> events(String event, Vertx vertx, ConsulClientOptions options)
Watch to monitoring the custom user events.
This maps to the /v1/event/list API internally.event - the event namevertx - the Vertx instanceoptions - the options to create underlying Consul clientWatch instancepublic static Watch<NodeList> nodes(Vertx vertx)
Watch to monitoring the list of available nodes.
The underlying Consul client will be created with default options.
This maps to the /v1/catalog/nodes API internally.vertx - the Vertx instanceWatch instancepublic static Watch<NodeList> nodes(Vertx vertx, ConsulClientOptions options)
Watch to monitoring the list of available nodes.
This maps to the /v1/catalog/nodes API internally.vertx - the Vertx instanceoptions - the options to create underlying Consul clientWatch instancepublic Watch<T> setHandler(Handler<WatchResult<T>> handler)
handler - the result handlerpublic void stop()
Copyright © 2022 Eclipse. All rights reserved.