io.vertx.ext.consul

## Class CheckOptions

- java.lang.Object
- - io.vertx.ext.consul.CheckOptions

-     public class CheckOptions
      extends Object

  Options used to register checks in Consul.
  Author:
    Ruslan Sennov

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CheckOptions()` Default constructor
    `CheckOptions(CheckOptions options)` Copy constructor
    `CheckOptions(JsonObject options)` Constructor from JSON

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getDeregisterAfter()` Get deregister timeout
    `String` | `getHttp()` Get HTTP address
    `String` | `getId()` Get check ID
    `String` | `getInterval()` Get checking interval
    `String` | `getName()` Get check name
    `String` | `getNotes()` Get check notes
    `String` | `getScript()` Get path to checking script
    `String` | `getServiceId()` Get the service ID to associate the registered check with an existing service provided by the agent.
    `CheckStatus` | `getStatus()` Get the check status to specify the initial state of the health check.
    `String` | `getTcp()` Get TCP address.
    `String` | `getTtl()` Get Time to Live of check
    `CheckOptions` | `setDeregisterAfter(String deregisterAfter)` Set deregister timeout.
    `CheckOptions` | `setHttp(String http)` Set HTTP address to check.
    `CheckOptions` | `setId(String id)` Set check ID
    `CheckOptions` | `setInterval(String interval)` Set checking interval
    `CheckOptions` | `setName(String name)` Set check name.
    `CheckOptions` | `setNotes(String notes)` Set check notes
    `CheckOptions` | `setScript(String script)` Set path to checking script.
    `CheckOptions` | `setServiceId(String serviceId)` Set the service ID to associate the registered check with an existing service provided by the agent.
    `CheckOptions` | `setStatus(CheckStatus status)` Set the check status to specify the initial state of the health check.
    `CheckOptions` | `setTcp(String tcp)` Set TCP address to check.
    `CheckOptions` | `setTtl(String ttl)` Set Time to Live of check.
    `JsonObject` | `toJson()` Convert to JSON

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### CheckOptions

          public CheckOptions()

      Default constructor

    - #### CheckOptions

          public CheckOptions(CheckOptions options)

      Copy constructor
      Parameters:
        `options` - the one to copy

    - #### CheckOptions

          public CheckOptions(JsonObject options)

      Constructor from JSON
      Parameters:
        `options` - the JSON

  - ### Method Detail

    - #### toJson

          public JsonObject toJson()

      Convert to JSON
      Returns:
        the JSON

    - #### getServiceId

          public String getServiceId()

      Get the service ID to associate the registered check with an existing service provided by the agent.
      Returns:
        the service ID

    - #### setServiceId

          public CheckOptions setServiceId(String serviceId)

      Set the service ID to associate the registered check with an existing service provided by the agent.
      Parameters:
        `serviceId` - the service ID
      Returns:
        reference to this, for fluency

    - #### getStatus

          public CheckStatus getStatus()

      Get the check status to specify the initial state of the health check.
      Returns:
        the check status

    - #### setStatus

          public CheckOptions setStatus(CheckStatus status)

      Set the check status to specify the initial state of the health check.
      Parameters:
        `status` - the check status
      Returns:
        reference to this, for fluency

    - #### getScript

          public String getScript()

      Get path to checking script
      Returns:
        path to script

    - #### setScript

          public CheckOptions setScript(String script)

      Set path to checking script. Also you should set checking interval
      Parameters:
        `script` - path to script
      Returns:
        reference to this, for fluency

    - #### getHttp

          public String getHttp()

      Get HTTP address
      Returns:
        HTTP address

    - #### setHttp

          public CheckOptions setHttp(String http)

      Set HTTP address to check. Also you should set checking interval
      Parameters:
        `http` - HTTP address
      Returns:
        reference to this, for fluency

    - #### getTtl

          public String getTtl()

      Get Time to Live of check
      Returns:
        Time to Live of check

    - #### setTtl

          public CheckOptions setTtl(String ttl)

      Set Time to Live of check.
      Parameters:
        `ttl` - Time to Live of check
      Returns:
        reference to this, for fluency

    - #### getTcp

          public String getTcp()

      Get TCP address. Also you should set checking interval
      Returns:
        TCP address

    - #### setTcp

          public CheckOptions setTcp(String tcp)

      Set TCP address to check. Also you should set checking interval
      Parameters:
        `tcp` - TCP address
      Returns:
        reference to this, for fluency

    - #### getInterval

          public String getInterval()

      Get checking interval
      Returns:
        interval

    - #### setInterval

          public CheckOptions setInterval(String interval)

      Set checking interval
      Parameters:
        `interval` - checking interval in Go's time format which is sequence of decimal numbers, each with optional fraction and a unit suffix, such as "300ms", "-1.5h" or "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h"
      Returns:
        reference to this, for fluency

    - #### getId

          public String getId()

      Get check ID
      Returns:
        check ID

    - #### setId

          public CheckOptions setId(String id)

      Set check ID
      Parameters:
        `id` - check ID
      Returns:
        reference to this, for fluency

    - #### getName

          public String getName()

      Get check name
      Returns:
        check name

    - #### setName

          public CheckOptions setName(String name)

      Set check name. This is mandatory field
      Parameters:
        `name` - check name
      Returns:
        reference to this, for fluency

    - #### getNotes

          public String getNotes()

      Get check notes
      Returns:
        check notes

    - #### setNotes

          public CheckOptions setNotes(String notes)

      Set check notes
      Parameters:
        `notes` - check notes
      Returns:
        reference to this, for fluency

    - #### getDeregisterAfter

          public String getDeregisterAfter()

      Get deregister timeout
      Returns:
        timeout

    - #### setDeregisterAfter

          public CheckOptions setDeregisterAfter(String deregisterAfter)

      Set deregister timeout. This is optional field, which is a timeout in the same time format as Interval and TTL. If a check is associated with a service and has the critical state for more than this configured value, then its associated service (and all of its associated checks) will automatically be deregistered. The minimum timeout is 1 minute, and the process that reaps critical services runs every 30 seconds, so it may take slightly longer than the configured timeout to trigger the deregistration. This should generally be configured with a timeout that's much, much longer than any expected recoverable outage for the given service.
      Parameters:
        `deregisterAfter` - timeout
      Returns:
        reference to this, for fluency

Copyright © 2017. All rights reserved.