Class HttpEndpoint


  • public class HttpEndpoint
    extends Object
    for HTTP endpoint (REST api). Consumers receive a HTTP client configured with the host and port of the endpoint.

    NOTE: This class has been automatically generated from the original non Mutiny-ified interface using Vert.x codegen.

    • Constructor Detail

      • HttpEndpoint

        public HttpEndpoint​(io.vertx.servicediscovery.types.HttpEndpoint delegate)
      • HttpEndpoint

        public HttpEndpoint​(Object delegate)
    • Method Detail

      • getDelegate

        public io.vertx.servicediscovery.types.HttpEndpoint getDelegate()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • createRecord

        public static io.vertx.servicediscovery.Record createRecord​(String name,
                                                                    String host,
                                                                    int port,
                                                                    String root,
                                                                    io.vertx.core.json.JsonObject metadata)
        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

        public static io.vertx.servicediscovery.Record createRecord​(String name,
                                                                    boolean ssl,
                                                                    String host,
                                                                    int port,
                                                                    String root,
                                                                    io.vertx.core.json.JsonObject metadata)
        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

        public static io.vertx.servicediscovery.Record createRecord​(String name,
                                                                    String host,
                                                                    int port,
                                                                    String root)
        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

        public static io.vertx.servicediscovery.Record createRecord​(String name,
                                                                    String host)
        Parameters:
        name - the name
        host - the host
        Returns:
        the created record
      • getClient

        @CheckReturnValue
        public static io.smallrye.mutiny.Uni<HttpClient> getClient​(ServiceDiscovery discovery,
                                                                   io.vertx.core.json.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.

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        discovery - The service discovery instance
        filter - The filter, optional
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • getClientAndAwait

        public static HttpClient getClientAndAwait​(ServiceDiscovery discovery,
                                                   io.vertx.core.json.JsonObject filter)
        Blocking variant of getClient(io.vertx.mutiny.servicediscovery.ServiceDiscovery,JsonObject).

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Parameters:
        discovery - The service discovery instance
        filter - The filter, optional
        Returns:
        the HttpClient instance produced by the operation.
      • getWebClient

        @CheckReturnValue
        public static io.smallrye.mutiny.Uni<WebClient> getWebClient​(ServiceDiscovery discovery,
                                                                     io.vertx.core.json.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.

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        discovery - The service discovery instance
        filter - The filter, optional
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • getWebClientAndAwait

        public static WebClient getWebClientAndAwait​(ServiceDiscovery discovery,
                                                     io.vertx.core.json.JsonObject filter)
        Blocking variant of getWebClient(io.vertx.mutiny.servicediscovery.ServiceDiscovery,JsonObject).

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Parameters:
        discovery - The service discovery instance
        filter - The filter, optional
        Returns:
        the WebClient instance produced by the operation.
      • getClient

        @CheckReturnValue
        public static io.smallrye.mutiny.Uni<HttpClient> getClient​(ServiceDiscovery discovery,
                                                                   io.vertx.core.json.JsonObject filter,
                                                                   io.vertx.core.json.JsonObject conf)
        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. This method accepts a configuration for the HTTP client

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        discovery - The service discovery instance
        filter - The filter, optional
        conf - the configuration of the client
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • getClientAndAwait

        public static HttpClient getClientAndAwait​(ServiceDiscovery discovery,
                                                   io.vertx.core.json.JsonObject filter,
                                                   io.vertx.core.json.JsonObject conf)
        Blocking variant of getClient(io.vertx.mutiny.servicediscovery.ServiceDiscovery,JsonObject,JsonObject).

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Parameters:
        discovery - The service discovery instance
        filter - The filter, optional
        conf - the configuration of the client
        Returns:
        the HttpClient instance produced by the operation.
      • getWebClient

        @CheckReturnValue
        public static io.smallrye.mutiny.Uni<WebClient> getWebClient​(ServiceDiscovery discovery,
                                                                     io.vertx.core.json.JsonObject filter,
                                                                     io.vertx.core.json.JsonObject conf)
        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. This method accepts a configuration for the HTTP client

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        discovery - The service discovery instance
        filter - The filter, optional
        conf - the configuration of the client
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • getWebClientAndAwait

        public static WebClient getWebClientAndAwait​(ServiceDiscovery discovery,
                                                     io.vertx.core.json.JsonObject filter,
                                                     io.vertx.core.json.JsonObject conf)
        Blocking variant of getWebClient(io.vertx.mutiny.servicediscovery.ServiceDiscovery,JsonObject,JsonObject).

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Parameters:
        discovery - The service discovery instance
        filter - The filter, optional
        conf - the configuration of the client
        Returns:
        the WebClient instance produced by the operation.
      • getClient

        @CheckReturnValue
        public static io.smallrye.mutiny.Uni<HttpClient> getClient​(ServiceDiscovery discovery,
                                                                   Function<io.vertx.servicediscovery.Record,​Boolean> 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.

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        discovery - The service discovery instance
        filter - The filter
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • getClientAndAwait

        public static HttpClient getClientAndAwait​(ServiceDiscovery discovery,
                                                   Function<io.vertx.servicediscovery.Record,​Boolean> filter)
        Blocking variant of getClient(io.vertx.mutiny.servicediscovery.ServiceDiscovery,Function).

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Parameters:
        discovery - The service discovery instance
        filter - The filter
        Returns:
        the HttpClient instance produced by the operation.
      • getWebClient

        @CheckReturnValue
        public static io.smallrye.mutiny.Uni<WebClient> getWebClient​(ServiceDiscovery discovery,
                                                                     Function<io.vertx.servicediscovery.Record,​Boolean> 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.

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        discovery - The service discovery instance
        filter - The filter
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • getWebClientAndAwait

        public static WebClient getWebClientAndAwait​(ServiceDiscovery discovery,
                                                     Function<io.vertx.servicediscovery.Record,​Boolean> filter)
        Blocking variant of getWebClient(io.vertx.mutiny.servicediscovery.ServiceDiscovery,Function).

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Parameters:
        discovery - The service discovery instance
        filter - The filter
        Returns:
        the WebClient instance produced by the operation.
      • getClient

        @CheckReturnValue
        public static io.smallrye.mutiny.Uni<HttpClient> getClient​(ServiceDiscovery discovery,
                                                                   Function<io.vertx.servicediscovery.Record,​Boolean> filter,
                                                                   io.vertx.core.json.JsonObject conf)
        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. This method accepts a configuration for the HTTP client.

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        discovery - The service discovery instance
        filter - The filter
        conf - the configuration of the client
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • getClientAndAwait

        public static HttpClient getClientAndAwait​(ServiceDiscovery discovery,
                                                   Function<io.vertx.servicediscovery.Record,​Boolean> filter,
                                                   io.vertx.core.json.JsonObject conf)
        Blocking variant of getClient(io.vertx.mutiny.servicediscovery.ServiceDiscovery,Function,JsonObject).

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Parameters:
        discovery - The service discovery instance
        filter - The filter
        conf - the configuration of the client
        Returns:
        the HttpClient instance produced by the operation.
      • getWebClient

        @CheckReturnValue
        public static io.smallrye.mutiny.Uni<WebClient> getWebClient​(ServiceDiscovery discovery,
                                                                     Function<io.vertx.servicediscovery.Record,​Boolean> filter,
                                                                     io.vertx.core.json.JsonObject conf)
        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. This method accepts a configuration for the HTTP client.

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        discovery - The service discovery instance
        filter - The filter
        conf - the configuration of the client
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • getWebClientAndAwait

        public static WebClient getWebClientAndAwait​(ServiceDiscovery discovery,
                                                     Function<io.vertx.servicediscovery.Record,​Boolean> filter,
                                                     io.vertx.core.json.JsonObject conf)
        Blocking variant of getWebClient(io.vertx.mutiny.servicediscovery.ServiceDiscovery,Function,JsonObject).

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Parameters:
        discovery - The service discovery instance
        filter - The filter
        conf - the configuration of the client
        Returns:
        the WebClient instance produced by the operation.
      • newInstance

        public static HttpEndpoint newInstance​(io.vertx.servicediscovery.types.HttpEndpoint arg)