Class CharonFactory

  • All Implemented Interfaces:
    ClientFactory

    public class CharonFactory
    extends java.lang.Object
    implements ClientFactory
    The CharonFactory generates charon client instances
    • Constructor Summary

      Constructors 
      Constructor Description
      CharonFactory()  
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      java.lang.String buildCacheKey​(ConsumedDestinationModel destination)
      Helper method to build cache key which holds client proxy.
      protected java.lang.String buildCacheKey​(java.lang.String credentialId, java.lang.String clientFileName)
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 1811.1.
      void clearCache()
      Remove all clients from the cache
      <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
      protected java.util.concurrent.ConcurrentHashMap<java.lang.String,​java.lang.Object> getCache()  
      void inValidateCache​(java.lang.String key)
      Invalidate the cache for the given key
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CharonFactory

        public CharonFactory()
    • Method Detail

      • client

        public <T> T client​(java.lang.String cacheKey,
                            java.lang.Class<T> clientType,
                            java.util.Map<java.lang.String,​java.lang.String> clientConfig)
        Description copied from interface: ClientFactory
        Generates a client proxy for the given client type
        Specified by:
        client in interface ClientFactory
        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

        public void inValidateCache​(java.lang.String key)
        Invalidate the cache for the given key
        Specified by:
        inValidateCache in interface ClientFactory
        Parameters:
        key - the key of client
      • buildCacheKey

        @Deprecated(since="1811",
                    forRemoval=true)
        protected java.lang.String buildCacheKey​(java.lang.String credentialId,
                                                 java.lang.String clientFileName)
        Deprecated, for removal: This API element is subject to removal in a future version.
        since 1811.1. Please use buildCacheKey method of ClientFactory
        Helper method to build cache key which holds client proxy.
        Parameters:
        credentialId - the id of credential
        clientFileName - name of the client
        Returns:
        cache key string
      • buildCacheKey

        public java.lang.String buildCacheKey​(ConsumedDestinationModel destination)
        Description copied from interface: ClientFactory
        Helper method to build cache key which holds client proxy.
        Specified by:
        buildCacheKey in interface ClientFactory
        Parameters:
        destination - consumed destination of the client
        Returns:
        cache key string
      • clearCache

        public void clearCache()
        Remove all clients from the cache
        Specified by:
        clearCache in interface ClientFactory
      • getCache

        protected java.util.concurrent.ConcurrentHashMap<java.lang.String,​java.lang.Object> getCache()