io.vertx.ext.consul

## Class Service

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

-     public class Service
      extends Object

  Holds properties of service and node that its containing
  Author:
    Ruslan Sennov

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Service()` Default constructor
    `Service(JsonObject service)` Constructor from JSON
    `Service(Service other)` Copy constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object o)`
    `String` | `getAddress()` Get service address
    `String` | `getId()` Get ID of service
    `Map<String,String>` | `getMeta()` Get arbitrary KV metadata linked to the service instance.
    `String` | `getName()` Get service name
    `String` | `getNode()` Get none name
    `String` | `getNodeAddress()` Get node address
    `int` | `getPort()` Get service port
    `List<String>` | `getTags()` Set list of service tags
    `int` | `hashCode()`
    `Service` | `setAddress(String address)` Set service address
    `Service` | `setId(String id)` Set ID of service
    `Service` | `setMeta(Map<String,String> meta)` Specifies arbitrary KV metadata linked to the service instance.
    `Service` | `setName(String name)` Set service name
    `Service` | `setNode(String node)` Set node name
    `Service` | `setNodeAddress(String nodeAddress)` Set node address
    `Service` | `setPort(int port)` Set service port
    `Service` | `setTags(List<String> tags)` Set list of service tags
    `JsonObject` | `toJson()` Convert to JSON

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

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

- - ### Constructor Detail

    - #### Service

          public Service()

      Default constructor

    - #### Service

          public Service(Service other)

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

    - #### Service

          public Service(JsonObject service)

      Constructor from JSON
      Parameters:
        `service` - the JSON

  - ### Method Detail

    - #### toJson

          public JsonObject toJson()

      Convert to JSON
      Returns:
        the JSON

    - #### getNode

          public String getNode()

      Get none name
      Returns:
        node name

    - #### setNode

          public Service setNode(String node)

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

    - #### getNodeAddress

          public String getNodeAddress()

      Get node address
      Returns:
        node address

    - #### setNodeAddress

          public Service setNodeAddress(String nodeAddress)

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

    - #### getId

          public String getId()

      Get ID of service
      Returns:
        ID of service

    - #### setId

          public Service setId(String id)

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

    - #### getName

          public String getName()

      Get service name
      Returns:
        service name

    - #### setName

          public Service setName(String name)

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

    - #### getTags

          public List<String> getTags()

      Set list of service tags
      Returns:
        list of service tags

    - #### setTags

          public Service setTags(List<String> tags)

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

    - #### getAddress

          public String getAddress()

      Get service address
      Returns:
        service address

    - #### setAddress

          public Service setAddress(String address)

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

    - #### getMeta

          public Map<String,String> getMeta()

      Get arbitrary KV metadata linked to the service instance.
      Returns:
        arbitrary KV metadata

    - #### setMeta

          public Service setMeta(Map<String,String> meta)

      Specifies arbitrary KV metadata linked to the service instance.
      Parameters:
        `meta` - arbitrary KV metadata
      Returns:
        reference to this, for fluency

    - #### getPort

          public int getPort()

      Get service port
      Returns:
        service port

    - #### setPort

          public Service setPort(int port)

      Set service port
      Parameters:
        `port` - service port
      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 © 2018 Eclipse. All rights reserved.