Esempio n. 1
0
        //生成系统定义好的DTS类实例
        FduDataTransmitStrategyBase getDTS_Instance(string dataTransmitStrategyClassName, string parameter)
        {
            if (dataTransmitStrategyClassName == null)
            {
                return(null);
            }
            FduDataTransmitStrategyBase instance = FduDTS_Factory.create(dataTransmitStrategyClassName, parameter);

            return(instance);
        }
Esempio n. 2
0
        /// <summary>
        /// Set data transmit strategy class manually. Not recommended. You can not change the data transmit strategy class instance once it is inited.
        /// </summary>
        /// <param name="strategy">The instance of dts class</param>
        public void setDataTransmitStrategy(FduDataTransmitStrategyBase strategy)
        {
            if (strategy == null)
            {
                return;
            }

            dataTransmitStrategy = strategy;
            dataTransmitStrategy.setObserver(this);
        }
Esempio n. 3
0
        /// <summary>
        /// Init observer. Create the Instance of corresponding data transmit strategy class
        /// </summary>
        protected void fduObserverInit()
        {
#if CLUSTER_ENABLE
            if (dataTransmitStrategy == null)
            {
                dataTransmitStrategy = getDTS_Instance(dataTransmitStrategyName, dataTransmitStrategyParameter);
                if (dataTransmitStrategy == null)
                {
                    dataTransmitStrategy = getCustomDTS_Instance(dataTransmitStrategyName, dataTransmitStrategyParameter);
                }
            }
#endif
            dataTransmitStrategyName      = null;
            dataTransmitStrategyParameter = null;
        }