io.vertx.rxjava.ext.consul

## Class Watch<T>

- java.lang.Object
- - io.vertx.rxjava.ext.consul.Watch<T>

-     public class Watch<T>
      extends Object

  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 `original` non RX-ified interface using Vert.x codegen.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static <any>` | `__TYPE_ARG`
    `<any>` | `__typeArg_0`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Watch(Watch delegate)`
    `Watch(Watch delegate, <any> typeArg_0)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    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, <any> __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()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### __TYPE_ARG

          public static final <any> __TYPE_ARG

    - #### __typeArg_0

          public final <any> __typeArg_0

  - ### Constructor Detail

    - #### Watch

          public Watch(Watch delegate)

    - #### Watch

          public Watch(Watch delegate,
                       <any> typeArg_0)

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### getDelegate

          public Watch getDelegate()

    - #### key

          public static Watch<KeyValue> key(String key,
                                            Vertx vertx)

      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.
      Parameters:
        `key` - the key
        `vertx` - the `Vertx` instance
      Returns:
        the `Watch` instance

    - #### key

          public static Watch<KeyValue> key(String key,
                                            Vertx vertx,
                                            ConsulClientOptions options)

      Creates `Watch` to monitoring a specific key in the KV store. This maps to the /v1/kv/ API internally.
      Parameters:
        `key` - the key
        `vertx` - the `Vertx` instance
        `options` - the options to create underlying Consul client
      Returns:
        the `Watch` instance

    - #### keyPrefix

          public static Watch<KeyValueList> keyPrefix(String keyPrefix,
                                                      Vertx vertx)

      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.
      Parameters:
        `keyPrefix` - the key
        `vertx` - the `Vertx` instance
      Returns:
        the `Watch` instance

    - #### keyPrefix

          public static Watch<KeyValueList> keyPrefix(String keyPrefix,
                                                      Vertx vertx,
                                                      ConsulClientOptions options)

      Creates `Watch` to monitoring a prefix of keys in the KV store. This maps to the /v1/kv/ API internally.
      Parameters:
        `keyPrefix` - the key
        `vertx` - the `Vertx` instance
        `options` - the options to create underlying Consul client
      Returns:
        the `Watch` instance

    - #### services

          public static Watch<ServiceList> services(Vertx vertx)

      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.
      Parameters:
        `vertx` - the `Vertx` instance
      Returns:
        the `Watch` instance

    - #### services

          public static Watch<ServiceList> services(Vertx vertx,
                                                    ConsulClientOptions options)

      Creates `Watch` to monitoring the list of available services. This maps to the /v1/catalog/services API internally.
      Parameters:
        `vertx` - the `Vertx` instance
        `options` - the options to create underlying Consul client
      Returns:
        the `Watch` instance

    - #### service

          public static Watch<ServiceEntryList> service(String service,
                                                        Vertx vertx)

      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.
      Parameters:
        `service` - the service name
        `vertx` - the `Vertx` instance
      Returns:
        the `Watch` instance

    - #### service

          public static Watch<ServiceEntryList> service(String service,
                                                        Vertx vertx,
                                                        ConsulClientOptions options)

      Creates `Watch` to monitoring the nodes providing the service. This maps to the /v1/health/service/<service> API internally.
      Parameters:
        `service` - the service name
        `vertx` - the `Vertx` instance
        `options` - the options to create underlying Consul client
      Returns:
        the `Watch` instance

    - #### events

          public static Watch<EventList> events(String event,
                                                Vertx vertx)

      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.
      Parameters:
        `event` - the event name
        `vertx` - the `Vertx` instance
      Returns:
        the `Watch` instance

    - #### events

          public static Watch<EventList> events(String event,
                                                Vertx vertx,
                                                ConsulClientOptions options)

      Creates `Watch` to monitoring the custom user events. This maps to the /v1/event/list API internally.
      Parameters:
        `event` - the event name
        `vertx` - the `Vertx` instance
        `options` - the options to create underlying Consul client
      Returns:
        the `Watch` instance

    - #### nodes

          public static Watch<NodeList> nodes(Vertx vertx)

      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.
      Parameters:
        `vertx` - the `Vertx` instance
      Returns:
        the `Watch` instance

    - #### nodes

          public static Watch<NodeList> nodes(Vertx vertx,
                                              ConsulClientOptions options)

      Creates `Watch` to monitoring the list of available nodes. This maps to the /v1/catalog/nodes API internally.
      Parameters:
        `vertx` - the `Vertx` instance
        `options` - the options to create underlying Consul client
      Returns:
        the `Watch` instance

    - #### setHandler

          public Watch<T> setHandler(Handler<WatchResult<T>> handler)

      Set the result handler. As data is changed, the handler will be called with the result.
      Parameters:
        `handler` - the result handler
      Returns:
        reference to this, for fluency

    - #### start

          public Watch<T> start()

      Start this `Watch`
      Returns:
        reference to this, for fluency

    - #### stop

          public void stop()

      Stop the watch and release its resources

    - #### newInstance

          public static <T> Watch<T> newInstance(Watch arg)

    - #### newInstance

          public static <T> Watch<T> newInstance(Watch arg,
                                                 <any> __typeArg_T)

Copyright © 2018 Eclipse. All rights reserved.