Class DefaultServiceClientProvider

java.lang.Object
com.netflix.spinnaker.config.DefaultServiceClientProvider
All Implemented Interfaces:
ServiceClientProvider

@Component public class DefaultServiceClientProvider extends Object implements ServiceClientProvider
Provider that returns a suitable service client capable of making http calls.
  • Constructor Details

    • DefaultServiceClientProvider

      public DefaultServiceClientProvider(List<ServiceClientFactory> serviceClientFactories, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
  • Method Details

    • getService

      public <T> T getService(Class<T> type, ServiceEndpoint serviceEndpoint)
      Description copied from interface: ServiceClientProvider
      Returns the concrete retrofit service client
      Specified by:
      getService in interface ServiceClientProvider
      Type Parameters:
      T - type of client , usually a interface with all the remote method definitions.
      Parameters:
      type - retrofit interface type
      serviceEndpoint - endpoint definition
      Returns:
      the retrofit interface implementation
    • getService

      public <T> T getService(Class<T> type, ServiceEndpoint serviceEndpoint, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
      Description copied from interface: ServiceClientProvider
      Returns the concrete retrofit service client
      Specified by:
      getService in interface ServiceClientProvider
      Type Parameters:
      T - type of client , usually a interface with all the remote method definitions.
      Parameters:
      type - retrofit interface type
      serviceEndpoint - endpoint definition
      objectMapper - object mapper for conversion
      Returns:
      the retrofit interface implementation