Interface HttpEndpoint

    • 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
      • getClient

        static Future<HttpClient> getClient​(ServiceDiscovery discovery,
                                            JsonObject filter)
        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
        Returns:
        a future notified with the client
      • getWebClient

        static Future<WebClient> getWebClient​(ServiceDiscovery discovery,
                                              JsonObject filter)
        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
        Returns:
        a future notified with the client
      • getClient

        static Future<HttpClient> getClient​(ServiceDiscovery discovery,
                                            JsonObject filter,
                                            JsonObject conf)
        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
        Returns:
        a future notified with the client
      • getWebClient

        static Future<WebClient> getWebClient​(ServiceDiscovery discovery,
                                              JsonObject filter,
                                              JsonObject conf)
        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
        Returns:
        a future notified with the client
      • getClient

        static Future<HttpClient> getClient​(ServiceDiscovery discovery,
                                            java.util.function.Function<Record,​Boolean> filter)
        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
        Returns:
        a future notified with the client
      • getWebClient

        static Future<WebClient> getWebClient​(ServiceDiscovery discovery,
                                              java.util.function.Function<Record,​Boolean> filter)
        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
        Returns:
        a future notified with the client
      • getClient

        static Future<HttpClient> getClient​(ServiceDiscovery discovery,
                                            java.util.function.Function<Record,​Boolean> filter,
                                            JsonObject conf)
        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
        Returns:
        a future notified with the client
      • getWebClient

        static Future<WebClient> getWebClient​(ServiceDiscovery discovery,
                                              java.util.function.Function<Record,​Boolean> filter,
                                              JsonObject conf)
        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
        Returns:
        a future notified with the client