public class Watch<T> extends Object
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 original non RX-ified interface using Vert.x codegen.| Modifier and Type | Field and Description |
|---|---|
static TypeArg<Watch> |
__TYPE_ARG |
TypeArg<T> |
__typeArg_0 |
| Constructor and Description |
|---|
Watch(Watch delegate) |
Watch(Watch delegate,
TypeArg<T> typeArg_0) |
| Modifier and Type | Method and Description |
|---|---|
Watch |
getDelegate() |
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 <T> Watch |
newInstance(Watch arg) |
static <T> Watch |
newInstance(Watch arg,
TypeArg<T> __typeArg_T) |
rx.Single<T> |
rxSetHandler()
Set the result handler.
|
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<AsyncResult<T>> handler)
Set the result handler.
|
Watch<T> |
start()
Start this
Watch |
void |
stop()
Stop the watch and release its resources
|
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/<key> 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/<key> API internally.key - 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.
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.
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 Watch<T> setHandler(Handler<AsyncResult<T>> handler)
handler - the result handlerpublic rx.Single<T> rxSetHandler()
public void stop()
Copyright © 2017. All rights reserved.