Interface ClientFactory
-
- All Known Implementing Classes:
CharonFactory
public interface ClientFactoryThe factory interface generates client instances
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringbuildCacheKey(ConsumedDestinationModel destination)Helper method to build cache key which holds client proxy.voidclearCache()Remove all clients from the cache<T> Tclient(java.lang.String cacheKey, java.lang.Class<T> clientType, java.util.Map<java.lang.String,java.lang.String> clientConfig)Generates a client proxy for the given client typevoidinValidateCache(java.lang.String key)Invalidate the cache for the given key
-
-
-
Method Detail
-
client
<T> T client(java.lang.String cacheKey, java.lang.Class<T> clientType, java.util.Map<java.lang.String,java.lang.String> clientConfig)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
void inValidateCache(java.lang.String key)
Invalidate the cache for the given key- Parameters:
key- the key of client
-
clearCache
void clearCache()
Remove all clients from the cache
-
buildCacheKey
java.lang.String buildCacheKey(ConsumedDestinationModel destination)
Helper method to build cache key which holds client proxy.- Parameters:
destination- consumed destination of the client- Returns:
- cache key string
-
-