Interface ServiceClientFactory


public interface ServiceClientFactory
Factory to build a client for a service.
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> T
    create(Class<T> type, ServiceEndpoint serviceEndpoint, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
    Builds a concrete client capable of making HTTP calls.
    default boolean
    supports(Class<?> type, ServiceEndpoint serviceEndpoint)
    Decide if this factory can support the endpoint provided.
  • Method Details

    • create

      <T> T create(Class<T> type, ServiceEndpoint serviceEndpoint, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
      Builds a concrete client capable of making HTTP calls.
      Type Parameters:
      T - type of client , usually a interface with all the remote method definitions.
      Parameters:
      type - client type
      serviceEndpoint - endpoint configuration
      objectMapper - mapper
      Returns:
      a implementation of the type of client given.
    • supports

      default boolean supports(Class<?> type, ServiceEndpoint serviceEndpoint)
      Decide if this factory can support the endpoint provided.
      Parameters:
      type - client type
      serviceEndpoint - endpoint configuration
      Returns:
      a client builder