Interface ServiceClientFactory
public interface ServiceClientFactory
Factory to build a client for a service.
-
Method Summary
Modifier and TypeMethodDescription<T> Tcreate(Class<T> type, ServiceEndpoint serviceEndpoint, com.fasterxml.jackson.databind.ObjectMapper objectMapper) Builds a concrete client capable of making HTTP calls.default booleansupports(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 typeserviceEndpoint- endpoint configurationobjectMapper- mapper- Returns:
- a implementation of the type of client given.
-
supports
Decide if this factory can support the endpoint provided.- Parameters:
type- client typeserviceEndpoint- endpoint configuration- Returns:
- a client builder
-