Interface ClientFactory
- All Known Implementing Classes:
CharonFactory
public interface ClientFactory
The factory interface generates client instances
-
Method Summary
Modifier and TypeMethodDescriptionbuildCacheKey(ConsumedDestinationModel destination) Helper method to build cache key which holds client proxy.voidRemove all clients from the cache<T> TGenerates a client proxy for the given client typevoidinValidateCache(String key) Invalidate the cache for the given key
-
Method Details
-
client
Generates a client proxy for the given client type- Type Parameters:
T- the type of the client- Parameters:
cacheKey- the id of the clientclientType- the class of client typeclientConfig- the map consist of configurations of client- Returns:
- the client proxy
-
inValidateCache
Invalidate the cache for the given key- Parameters:
key- the key of client
-
clearCache
void clearCache()Remove all clients from the cache -
buildCacheKey
Helper method to build cache key which holds client proxy.- Parameters:
destination- consumed destination of the client- Returns:
- cache key string
-