Interface ServiceClientFactory


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

      • create

        <T> T create​(java.lang.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​(java.lang.Class<?> type,
                                 ServiceEndpoint serviceEndpoint)
        Decide if this factory can support the endpoint provided.
        Parameters:
        type - client type
        serviceEndpoint - endpoint configuration
        Returns:
        a client builder