vertx / io.vertx.reactivex.ext.consul / Watch

# Watch

`open class Watch<T : Any>`

Watches are a way of specifying a view of data (e.g. list of nodes, KV pairs, health checks) which is monitored for updates. When an update is detected, an `Handler` with `AsyncResult` is invoked. 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 io.vertx.ext.consul.Watch non RX-ified interface using Vert.x codegen.

### Constructors

<init> | `Watch(delegate: Watch<Any>)` `Watch(delegate: Watch<Any>, typeArg_0: TypeArg<T>)`

### Properties

__TYPE_ARG | `static val __TYPE_ARG: TypeArg<Watch<Any>>`
__typeArg_0 | `val __typeArg_0: TypeArg<T>`

### Functions

equals | `open fun equals(other: Any?): Boolean`
events | `open static fun events(event: String, vertx: Vertx): Watch<EventList>` Creates `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. `open static fun events(event: String, vertx: Vertx, options: ConsulClientOptions): Watch<EventList>` Creates `Watch` to monitoring the custom user events. This maps to the /v1/event/list API internally.
getDelegate | `open fun getDelegate(): Watch<Any>`
hashCode | `open fun hashCode(): Int`
key | `open static fun key(key: String, vertx: Vertx): Watch<KeyValue>` Creates `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. `open static fun key(key: String, vertx: Vertx, options: ConsulClientOptions): Watch<KeyValue>` Creates `Watch` to monitoring a specific key in the KV store. This maps to the /v1/kv/ API internally.
keyPrefix | `open static fun keyPrefix(keyPrefix: String, vertx: Vertx): Watch<KeyValueList>` Creates `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. `open static fun keyPrefix(keyPrefix: String, vertx: Vertx, options: ConsulClientOptions): Watch<KeyValueList>` Creates `Watch` to monitoring a prefix of keys in the KV store. This maps to the /v1/kv/ API internally.
newInstance | `open static fun <T : Any> newInstance(arg: Watch<Any>): Watch<T>` `open static fun <T : Any> newInstance(arg: Watch<Any>, __typeArg_T: TypeArg<T>): Watch<T>`
nodes | `open static fun nodes(vertx: Vertx): Watch<NodeList>` Creates `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. `open static fun nodes(vertx: Vertx, options: ConsulClientOptions): Watch<NodeList>` Creates `Watch` to monitoring the list of available nodes. This maps to the /v1/catalog/nodes API internally.
service | `open static fun service(service: String, vertx: Vertx): Watch<ServiceEntryList>` Creates `Watch` to monitoring the nodes providing the service. The underlying Consul client will be created with default options. This maps to the /v1/health/service/<service> API internally. `open static fun service(service: String, vertx: Vertx, options: ConsulClientOptions): Watch<ServiceEntryList>` Creates `Watch` to monitoring the nodes providing the service. This maps to the /v1/health/service/<service> API internally.
services | `open static fun services(vertx: Vertx): Watch<ServiceList>` Creates `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. `open static fun services(vertx: Vertx, options: ConsulClientOptions): Watch<ServiceList>` Creates `Watch` to monitoring the list of available services. This maps to the /v1/catalog/services API internally.
setHandler | `open fun setHandler(handler: Handler<WatchResult<T>>): Watch<T>` Set the result handler. As data is changed, the handler will be called with the result.
start | `open fun start(): Watch<T>` Start this `Watch`
stop | `open fun stop(): Unit` Stop the watch and release its resources
toString | `open fun toString(): String`