Annotation Interface ServiceRef


@Documented @Retention(RUNTIME) @Target({FIELD,PARAMETER}) public @interface ServiceRef
Requests a stable binding to an explicitly versioned ordinary business interface. The host must provide discovery, authorization and the named binding policy. Annotation presence grants no authority. Refresh never implies retry or durable deduplication of an invocation.
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Returns the logical service name.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Returns the public contract identity.
    int
    Returns the required contract version.
    Returns a host-owned binding policy identifier.
    Returns the explicit refresh mode.
  • Element Details

    • name

      String name
      Returns the logical service name.
      Returns:
      exact service name
    • contractId

      String contractId
      Returns the public contract identity.
      Returns:
      explicit identity, or empty to use the requested interface binary name
      Default:
      ""
    • contractVersion

      int contractVersion
      Returns the required contract version.
      Returns:
      positive version, default1
      Default:
      1
    • refresh

      Returns the explicit refresh mode.
      Returns:
      NEVER unless opted in
      Default:
      NEVER
    • policy

      String policy
      Returns a host-owned binding policy identifier.
      Returns:
      default policy name
      Default:
      "default"