Exemplo n.º 1
0
 /// <summary>
 /// Creates an instance of the object factory of a specified type
 /// </summary>
 /// <param name="factoryType">the type of Object factory to return</param>
 /// <param name="agentInstance">the running instance of Agent</param>
 /// <returns>the requested object factory</returns>
 /// <exception cref="OpenADK.Library.AdkException"></exception>
 public override object CreateInstance( ADKFactoryType factoryType, Agent agentInstance )
 {
     switch (factoryType)
     {
         case ADKFactoryType.ZONE:
             return new ZoneFactoryImpl(agentInstance);
         case ADKFactoryType.TOPIC:
             return new TopicFactoryImpl(agentInstance);
         case ADKFactoryType.POLICY_FACTORY:
             return new AdkDefaultPolicy(agentInstance);
         case ADKFactoryType.POLICY_MANAGER:
             return new PolicyManagerImpl(agentInstance);
     }
     return null;
 }
Exemplo n.º 2
0
        /// <summary>
        /// Creates an instance of the object factory of a specified type
        /// </summary>
        /// <param name="factoryType">the type of Object factory to return</param>
        /// <param name="agentInstance">the running instance of Agent</param>
        /// <returns>the requested object factory</returns>
        /// <exception cref="OpenADK.Library.AdkException"></exception>
        public override object CreateInstance(ADKFactoryType factoryType, Agent agentInstance)
        {
            switch (factoryType)
            {
            case ADKFactoryType.ZONE:
                return(new ZoneFactoryImpl(agentInstance));

            case ADKFactoryType.TOPIC:
                return(new TopicFactoryImpl(agentInstance));

            case ADKFactoryType.POLICY_FACTORY:
                return(new AdkDefaultPolicy(agentInstance));

            case ADKFactoryType.POLICY_MANAGER:
                return(new PolicyManagerImpl(agentInstance));
            }
            return(null);
        }
Exemplo n.º 3
0
 /// <summary>
 /// Creates an instance of the object factory of a specified type
 /// </summary>
 /// <param name="factoryType">the type of Object factory to return</param>
 /// <param name="agentInstance">the running instance of Agent (required)</param>
 /// <returns>the requested object factory</returns>
 public abstract Object CreateInstance(ADKFactoryType factoryType, Agent agentInstance);
Exemplo n.º 4
0
 /// <summary>
 /// Creates an instance of the object factory of a specified type
 /// </summary>
 /// <param name="factoryType">the type of Object factory to return</param>
 /// <param name="agentInstance">the running instance of Agent (required)</param>
 /// <returns>the requested object factory</returns>
 public abstract Object CreateInstance(ADKFactoryType factoryType, Agent agentInstance);