Package: io.vertx.groovy.servicediscovery.types

## [Groovy] Class HttpEndpoint

- io.vertx.groovy.servicediscovery.types.HttpEndpoint

- for HTTP endpoint (REST api). Consumers receive a HTTP client configured with the host and port of the endpoint.

- - ### Constructor Summary

    Constructors
    Constructor and description
    `HttpEndpoint (java.lang.Object delegate)`

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `static java.util.Map<java.lang.String, java.lang.Object>` | `createRecord(java.lang.String name, java.lang.String host, int port, java.lang.String root, java.util.Map<java.lang.String, java.lang.Object> metadata)` Convenient method to create a record for a HTTP endpoint.
    `static java.util.Map<java.lang.String, java.lang.Object>` | `createRecord(java.lang.String name, boolean ssl, java.lang.String host, int port, java.lang.String root, java.util.Map<java.lang.String, java.lang.Object> metadata)` Same as HttpEndpoint.createRecord but let you configure whether or not the service is using `https`.
    `static java.util.Map<java.lang.String, java.lang.Object>` | `createRecord(java.lang.String name, java.lang.String host, int port, java.lang.String root)` Same as HttpEndpoint.createRecord but without metadata.
    `static java.util.Map<java.lang.String, java.lang.Object>` | `createRecord(java.lang.String name, java.lang.String host)` Same as HttpEndpoint.createRecord but without metadata, using the port 80 and using "/" as root.
    `static void` | `getClient(ServiceDiscovery discovery, java.util.Map<java.lang.String, java.lang.Object> filter, io.vertx.core.Handler<io.vertx.core.AsyncResult<HttpClient>> resultHandler)` Convenient method that looks for a HTTP endpoint and provides the configured .
    `java.lang.Object` | `getDelegate()`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class java.lang.Object` | `java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()`

- - ### Constructor Detail

    - #### HttpEndpoint(java.lang.Object delegate)

  - ### Method Detail

    - #### static java.util.Map<java.lang.String, java.lang.Object> createRecord(java.lang.String name, java.lang.String host, int port, java.lang.String root, java.util.Map<java.lang.String, java.lang.Object> metadata)

      Convenient method to create a record for a HTTP endpoint.

      Returns:
        the created record (see Record)
      Parameters:
        `name` - the service name
        `host` - the host (IP or DNS name), it must be the _public_ IP / name
        `port` - the port, it must be the _public_ port
        `root` - the path of the service, "/" if not set
        `metadata` - additional metadata

    - #### static java.util.Map<java.lang.String, java.lang.Object> createRecord(java.lang.String name, boolean ssl, java.lang.String host, int port, java.lang.String root, java.util.Map<java.lang.String, java.lang.Object> metadata)

      Same as HttpEndpoint.createRecord but let you configure whether or not the service is using `https`.

      Returns:
        the created record (see Record)
      Parameters:
        `name` - the service name
        `ssl` - whether or not the service is using HTTPS
        `host` - the host (IP or DNS name), it must be the _public_ IP / name
        `port` - the port, it must be the _public_ port
        `root` - the path of the service, "/" if not set
        `metadata` - additional metadata

    - #### static java.util.Map<java.lang.String, java.lang.Object> createRecord(java.lang.String name, java.lang.String host, int port, java.lang.String root)

      Same as HttpEndpoint.createRecord but without metadata.

      Returns:
        the created record (see Record)
      Parameters:
        `name` - the service name
        `host` - the host, must be public
        `port` - the port
        `root` - the root, if not set "/" is used

    - #### static java.util.Map<java.lang.String, java.lang.Object> createRecord(java.lang.String name, java.lang.String host)

      Same as HttpEndpoint.createRecord but without metadata, using the port 80 and using "/" as root.

      Returns:
        the created record (see Record)
      Parameters:
        `name` - the name
        `host` - the host

    - #### static void getClient(ServiceDiscovery discovery, java.util.Map<java.lang.String, java.lang.Object> filter, io.vertx.core.Handler<io.vertx.core.AsyncResult<HttpClient>> resultHandler)

      Convenient method that looks for a HTTP endpoint and provides the configured . The async result is marked as failed is there are no matching services, or if the lookup fails.

      Parameters:
        `discovery` - The service discovery instance
        `filter` - The filter, optional
        `resultHandler` - The result handler

    - #### java.lang.Object getDelegate()