コード例 #1
0
ファイル: SocialChannelBuilder.cs プロジェクト: Opentany/Tech
        /**
         * Find an appropriate channel according to the properties
         *
         * @param channelProperties
         * @return
         */
        public SocialChannel buildChannel(SocialChannelProperties channelProperties)
        {
            // lookup channel by name
            SocialChannel instance = null;

            String channelName = channelProperties.getProperty(SocialChannelPropertyKey.NAME);

            if (channelName != null && this.pluggedChannels.ContainsKey(channelName))
            {
                // Try the cache
                instance = this.cachedChannels[channelName];
                if (instance == null)
                {
                    instance = instantiateChannel(this.pluggedChannels[channelName]);
                    this.cachedChannels.Add(channelName, instance);
                }
            }

            return(instance);
        }
コード例 #2
0
ファイル: SocialChannelBuilder.cs プロジェクト: Opentany/Tech
 /**
  * @param put
  * @param clazz
  */
 protected void plugChannel(SocialChannelProperties put, Class <? extends SocialChannel> clazz)