Annotation Interface RestClient.Endpoint

Enclosing class:
RestClient

@Target(TYPE) @Retention(CLASS) @Documented public static @interface RestClient.Endpoint
Definition of the rest client API. An implementation of this interface (MUST be an interface) can be injected when using Helidon Injection.

Configuration options for rest clients (prefixed by configKey():

REST Client Configuration Options
Key Default Value Description
uri   URI of this service
client   Client configuration, see Proxy (Base URI will always be overridden by the uri defined on this level)
In case key client node exists under the configuration node of this API, a new client will be created for this instance (this always wins). In case the clientName() is defined, and an instance of that name is available in registry, it will be used for this instance. Then we use an unnamed client instance from the registry (if any). The last resort is to create a new client that would be used for this API.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Name of a named instance of WebClient we attempt to get from registry.
    Configuration key base to use when looking up options for the generated client.
    The URI of this API.
  • Element Details

    • value

      String value
      The URI of this API. When left blank (default), the URI must be specified in configuration. The configuration key is either configKey(), and if that value is empty, the fully qualified class name of the annotated interface, with suffix .uri, such as io.helidon.application.MyClient.uri.

      Note that Http.Path annotation on the API (or its super interface) is added to this value.

      Returns:
      endpoint URI of the generated client
      Default:
      ""
    • configKey

      String configKey
      Configuration key base to use when looking up options for the generated client.
      Returns:
      configuration key prefix
      Default:
      ""
    • clientName

      String clientName
      Name of a named instance of WebClient we attempt to get from registry.
      Returns:
      client name
      Default:
      ""