io.vertx.ext.consul

## Class ServiceEntry

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

-     public class ServiceEntry
      extends Object

  Holds properties of service, node and related checks
  Author:
    Ruslan Sennov

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ServiceEntry()` Default constructor
    `ServiceEntry(JsonObject json)` Constructor from JSON
    `ServiceEntry(ServiceEntry other)` Copy constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `CheckStatus` | `aggregatedStatus()` AggregatedStatus returns the "best" status for the list of health checks.
    `boolean` | `equals(Object o)`
    `List<Check>` | `getChecks()` Get list of checks
    `Node` | `getNode()` Get node
    `Service` | `getService()` Get service
    `int` | `hashCode()`
    `ServiceEntry` | `setChecks(List<Check> checks)` Set list of checks
    `ServiceEntry` | `setNode(Node node)` Set node
    `ServiceEntry` | `setService(Service service)` Set service
    `JsonObject` | `toJson()` Convert to JSON

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

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

- - ### Constructor Detail

    - #### ServiceEntry

          public ServiceEntry()

      Default constructor

    - #### ServiceEntry

          public ServiceEntry(ServiceEntry other)

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

    - #### ServiceEntry

          public ServiceEntry(JsonObject json)

      Constructor from JSON
      Parameters:
        `json` - the JSON

  - ### Method Detail

    - #### toJson

          public JsonObject toJson()

      Convert to JSON
      Returns:
        the JSON

    - #### aggregatedStatus

          public CheckStatus aggregatedStatus()

      AggregatedStatus returns the "best" status for the list of health checks. Because a given entry may have many service and node-level health checks attached, this function determines the best representative of the status as as single string using the following heuristic: critical > warning > passing
      Returns:
        an aggregated status

    - #### getNode

          public Node getNode()

      Get node
      Returns:
        node

    - #### getService

          public Service getService()

      Get service
      Returns:
        service

    - #### getChecks

          public List<Check> getChecks()

      Get list of checks
      Returns:
        list of checks

    - #### setNode

          public ServiceEntry setNode(Node node)

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

    - #### setService

          public ServiceEntry setService(Service service)

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

    - #### setChecks

          public ServiceEntry setChecks(List<Check> checks)

      Set list of checks
      Parameters:
        `checks` - list of checks
      Returns:
        reference to this, for fluency

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

Copyright © 2021 Eclipse. All rights reserved.