Interface Service


@Immutable public interface Service
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static Service
    from(Service service)
     
    int
    The API version of the service.
    The URL of the remote service infrastructure piece.
    The validity window in which this service may be used for signing.
    static Service
    of(URI url, int apiVersion)
    INTERNAL ONLY: Returns a default Service object for a url that is valid forever.
    select(List<Service> services, List<Integer> apiVersions)
    Return a single service that is currently valid, that also exposes an api version supported by this client.
  • Method Details

    • getUrl

      URI getUrl()
      The URL of the remote service infrastructure piece.
    • getApiVersion

      int getApiVersion()
      The API version of the service.
    • getValidFor

      ValidFor getValidFor()
      The validity window in which this service may be used for signing.
    • from

      static Service from(Service service)
    • of

      static Service of(URI url, int apiVersion)
      INTERNAL ONLY: Returns a default Service object for a url that is valid forever. Only used transitionally as we adopt SigningConfig throughout the ecosystem.
    • select

      static Optional<Service> select(List<Service> services, List<Integer> apiVersions)
      Return a single service that is currently valid, that also exposes an api version supported by this client. If multiple services match that criteria, filter by those services with the highest apiVersion and further sort by services that were started most recently.
      Parameters:
      services - the service list
      apiVersions - an list of api version this clients supports
      Returns:
      A service if found