io.vertx.servicediscovery.types

## Interface HttpEndpoint

- All Superinterfaces:
    ServiceType

      public interface HttpEndpoint
      extends ServiceType

  `ServiceType` for HTTP endpoint (REST api). Consumers receive a HTTP client configured with the host and port of the endpoint.
  Author:
    Clement Escoffier

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `TYPE`

    - ### Fields inherited from interface io.vertx.servicediscovery.spi.ServiceType

      `UNKNOWN`

  - ### Method Summary

    All Methods Static Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Record` | `createRecord(String name, boolean ssl, String host, int port, String root, JsonObject metadata)` Same as `createRecord(String, String, int, String, JsonObject)` but let you configure whether or not the service is using `https`.
    `static Record` | `createRecord(String name, String host)` Same as `createRecord(String, String, int, String, JsonObject)` but without metadata, using the port 80 and using "/" as root.
    `static Record` | `createRecord(String name, String host, int port, String root)` Same as `createRecord(String, String, int, String, JsonObject)` but without metadata.
    `static Record` | `createRecord(String name, String host, int port, String root, JsonObject metadata)` Convenient method to create a record for a HTTP endpoint.
    `static Future<HttpClient>` | `getClient(ServiceDiscovery discovery, java.util.function.Function<Record,Boolean> filter)` Like `getClient(ServiceDiscovery, Function, Handler)` but returns a future of the result
    `static void` | `getClient(ServiceDiscovery discovery, java.util.function.Function<Record,Boolean> filter, Handler<AsyncResult<HttpClient>> resultHandler)` Convenient method that looks for a HTTP endpoint and provides the configured `HttpClient`.
    `static Future<HttpClient>` | `getClient(ServiceDiscovery discovery, java.util.function.Function<Record,Boolean> filter, JsonObject conf)` Like `getClient(ServiceDiscovery, JsonObject, JsonObject, Handler)` but returns a future of the result
    `static void` | `getClient(ServiceDiscovery discovery, java.util.function.Function<Record,Boolean> filter, JsonObject conf, Handler<AsyncResult<HttpClient>> resultHandler)` Convenient method that looks for a HTTP endpoint and provides the configured `HttpClient`.
    `static Future<HttpClient>` | `getClient(ServiceDiscovery discovery, JsonObject filter)` Like `getClient(ServiceDiscovery, JsonObject, Handler)` but returns a future of the result
    `static void` | `getClient(ServiceDiscovery discovery, JsonObject filter, Handler<AsyncResult<HttpClient>> resultHandler)` Convenient method that looks for a HTTP endpoint and provides the configured `HttpClient`.
    `static Future<HttpClient>` | `getClient(ServiceDiscovery discovery, JsonObject filter, JsonObject conf)` Like `getClient(ServiceDiscovery, JsonObject, JsonObject, Handler)` but returns a future of the result
    `static void` | `getClient(ServiceDiscovery discovery, JsonObject filter, JsonObject conf, Handler<AsyncResult<HttpClient>> resultHandler)` Convenient method that looks for a HTTP endpoint and provides the configured `HttpClient`.
    `static Future<WebClient>` | `getWebClient(ServiceDiscovery discovery, java.util.function.Function<Record,Boolean> filter)` Like `getWebClient(ServiceDiscovery, Function, Handler)` but returns a future of the result
    `static void` | `getWebClient(ServiceDiscovery discovery, java.util.function.Function<Record,Boolean> filter, Handler<AsyncResult<WebClient>> resultHandler)` Convenient method that looks for a HTTP endpoint and provides the configured `WebClient`.
    `static Future<WebClient>` | `getWebClient(ServiceDiscovery discovery, java.util.function.Function<Record,Boolean> filter, JsonObject conf)` Like `getWebClient(ServiceDiscovery, JsonObject, JsonObject, Handler)` but returns a future of the result
    `static void` | `getWebClient(ServiceDiscovery discovery, java.util.function.Function<Record,Boolean> filter, JsonObject conf, Handler<AsyncResult<WebClient>> resultHandler)` Convenient method that looks for a HTTP endpoint and provides the configured `WebClient`.
    `static Future<WebClient>` | `getWebClient(ServiceDiscovery discovery, JsonObject filter)` Like `getWebClient(ServiceDiscovery, JsonObject, Handler)` but returns a future of the result
    `static void` | `getWebClient(ServiceDiscovery discovery, JsonObject filter, Handler<AsyncResult<WebClient>> resultHandler)` Convenient method that looks for a HTTP endpoint and provides the configured .
    `static Future<WebClient>` | `getWebClient(ServiceDiscovery discovery, JsonObject filter, JsonObject conf)` Like `getWebClient(ServiceDiscovery, JsonObject, JsonObject, Handler)` but returns a future of the result
    `static void` | `getWebClient(ServiceDiscovery discovery, JsonObject filter, JsonObject conf, Handler<AsyncResult<WebClient>> resultHandler)` Convenient method that looks for a HTTP endpoint and provides the configured `WebClient`.

    - ### Methods inherited from interface io.vertx.servicediscovery.spi.ServiceType

      `get, name`

- - ### Field Detail

    - #### TYPE

          static final String TYPE

      See Also:
        Constant Field Values

  - ### Method Detail

    - #### createRecord

          static Record createRecord(String name,
                                     String host,
                                     int port,
                                     String root,
                                     JsonObject metadata)

      Convenient method to create a record for a HTTP endpoint.
      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
      Returns:
        the created record

    - #### createRecord

          static Record createRecord(String name,
                                     boolean ssl,
                                     String host,
                                     int port,
                                     String root,
                                     JsonObject metadata)

      Same as `createRecord(String, String, int, String, JsonObject)` but let you configure whether or not the service is using `https`.
      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
      Returns:
        the created record

    - #### createRecord

          static Record createRecord(String name,
                                     String host,
                                     int port,
                                     String root)

      Same as `createRecord(String, String, int, String, JsonObject)` but without metadata.
      Parameters:
        `name` - the service name
        `host` - the host, must be public
        `port` - the port
        `root` - the root, if not set "/" is used
      Returns:
        the created record

    - #### createRecord

          static Record createRecord(String name,
                                     String host)

      Same as `createRecord(String, String, int, String, JsonObject)` but without metadata, using the port 80 and using "/" as root.
      Parameters:
        `name` - the name
        `host` - the host
      Returns:
        the created record

    - #### getClient

          static void getClient(ServiceDiscovery discovery,
                                JsonObject filter,
                                Handler<AsyncResult<HttpClient>> resultHandler)

      Convenient method that looks for a HTTP endpoint and provides the configured `HttpClient`. 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

    - #### getClient

          static Future<HttpClient> getClient(ServiceDiscovery discovery,
                                              JsonObject filter)

      Like `getClient(ServiceDiscovery, JsonObject, Handler)` but returns a future of the result

    - #### getWebClient

          static void getWebClient(ServiceDiscovery discovery,
                                   JsonObject filter,
                                   Handler<AsyncResult<WebClient>> 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

    - #### getWebClient

          static Future<WebClient> getWebClient(ServiceDiscovery discovery,
                                                JsonObject filter)

      Like `getWebClient(ServiceDiscovery, JsonObject, Handler)` but returns a future of the result

    - #### getClient

          static void getClient(ServiceDiscovery discovery,
                                JsonObject filter,
                                JsonObject conf,
                                Handler<AsyncResult<HttpClient>> resultHandler)

      Convenient method that looks for a HTTP endpoint and provides the configured `HttpClient`. The async result is marked as failed is there are no matching services, or if the lookup fails. This method accepts a configuration for the HTTP client
      Parameters:
        `discovery` - The service discovery instance
        `filter` - The filter, optional
        `conf` - the configuration of the client
        `resultHandler` - The result handler

    - #### getClient

          static Future<HttpClient> getClient(ServiceDiscovery discovery,
                                              JsonObject filter,
                                              JsonObject conf)

      Like `getClient(ServiceDiscovery, JsonObject, JsonObject, Handler)` but returns a future of the result

    - #### getWebClient

          static void getWebClient(ServiceDiscovery discovery,
                                   JsonObject filter,
                                   JsonObject conf,
                                   Handler<AsyncResult<WebClient>> resultHandler)

      Convenient method that looks for a HTTP endpoint and provides the configured `WebClient`. The async result is marked as failed is there are no matching services, or if the lookup fails. This method accepts a configuration for the HTTP client
      Parameters:
        `discovery` - The service discovery instance
        `filter` - The filter, optional
        `conf` - the configuration of the client
        `resultHandler` - The result handler

    - #### getWebClient

          static Future<WebClient> getWebClient(ServiceDiscovery discovery,
                                                JsonObject filter,
                                                JsonObject conf)

      Like `getWebClient(ServiceDiscovery, JsonObject, JsonObject, Handler)` but returns a future of the result

    - #### getClient

          static void getClient(ServiceDiscovery discovery,
                                java.util.function.Function<Record,Boolean> filter,
                                Handler<AsyncResult<HttpClient>> resultHandler)

      Convenient method that looks for a HTTP endpoint and provides the configured `HttpClient`. 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
        `resultHandler` - The result handler

    - #### getClient

          static Future<HttpClient> getClient(ServiceDiscovery discovery,
                                              java.util.function.Function<Record,Boolean> filter)

      Like `getClient(ServiceDiscovery, Function, Handler)` but returns a future of the result

    - #### getWebClient

          static void getWebClient(ServiceDiscovery discovery,
                                   java.util.function.Function<Record,Boolean> filter,
                                   Handler<AsyncResult<WebClient>> resultHandler)

      Convenient method that looks for a HTTP endpoint and provides the configured `WebClient`. 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
        `resultHandler` - The result handler

    - #### getWebClient

          static Future<WebClient> getWebClient(ServiceDiscovery discovery,
                                                java.util.function.Function<Record,Boolean> filter)

      Like `getWebClient(ServiceDiscovery, Function, Handler)` but returns a future of the result

    - #### getClient

          static void getClient(ServiceDiscovery discovery,
                                java.util.function.Function<Record,Boolean> filter,
                                JsonObject conf,
                                Handler<AsyncResult<HttpClient>> resultHandler)

      Convenient method that looks for a HTTP endpoint and provides the configured `HttpClient`. The async result is marked as failed is there are no matching services, or if the lookup fails. This method accepts a configuration for the HTTP client.
      Parameters:
        `discovery` - The service discovery instance
        `filter` - The filter
        `conf` - the configuration of the client
        `resultHandler` - The result handler

    - #### getClient

          static Future<HttpClient> getClient(ServiceDiscovery discovery,
                                              java.util.function.Function<Record,Boolean> filter,
                                              JsonObject conf)

      Like `getClient(ServiceDiscovery, JsonObject, JsonObject, Handler)` but returns a future of the result

    - #### getWebClient

          static void getWebClient(ServiceDiscovery discovery,
                                   java.util.function.Function<Record,Boolean> filter,
                                   JsonObject conf,
                                   Handler<AsyncResult<WebClient>> resultHandler)

      Convenient method that looks for a HTTP endpoint and provides the configured `WebClient`. The async result is marked as failed is there are no matching services, or if the lookup fails. This method accepts a configuration for the HTTP client.
      Parameters:
        `discovery` - The service discovery instance
        `filter` - The filter
        `conf` - the configuration of the client
        `resultHandler` - The result handler

    - #### getWebClient

          static Future<WebClient> getWebClient(ServiceDiscovery discovery,
                                                java.util.function.Function<Record,Boolean> filter,
                                                JsonObject conf)

      Like `getWebClient(ServiceDiscovery, JsonObject, JsonObject, Handler)` but returns a future of the result

Copyright © 2022 Eclipse. All rights reserved.