Interface ClientFactory

All Known Implementing Classes:
CharonFactory

public interface ClientFactory
The factory interface generates client instances
  • Method Details

    • client

      <T> T client(String cacheKey, Class<T> clientType, Map<String,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 client
      clientType - the class of client type
      clientConfig - the map consist of configurations of client
      Returns:
      the client proxy
    • inValidateCache

      void inValidateCache(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

      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