///<summary> /// Constructor /// </summary> /// <param name="propertyClassIceId">A string</param> /// <param name="propertyFunctionsIceIds">A string[]</param> /// <param name="identifier">A string</param> public PropertyBoxModuleFactoryCreatorI(string propertyClassIceId, string[] propertyFunctionsIceIds, string identifier, PropertyValue defaultValue, ValueFromPrx valueFromPrx, PropertyReapThread reaper, Ice.ObjectAdapter adapter, string settingModuleIdentifier) { this.propertyClassIceId = propertyClassIceId; this.propertyFunctionsIceIds = propertyFunctionsIceIds; this.identifier = identifier; this.valueFromPrx = valueFromPrx; this.reaper = reaper; this.defaultValue = defaultValue; this.myProxy = PropertyBoxModuleFactoryCreatorPrxHelper.uncheckedCast(adapter.add(this,Ice.Util.stringToIdentity(identifier))); this.settingModuleIdentifier = settingModuleIdentifier; }
/// <summary> /// Service execution method /// </summary> /// <param name="name">Name of service</param> /// <param name="communicator">Ice communicator</param> /// <param name="args">Arguments from command line</param> public void start(string name, Ice.Communicator communicator, string[] args) { Debug.Listeners.Clear(); Debug.Listeners.Add(new TextWriterTraceListener(name + ".log")); Debug.AutoFlush = true; Debug.WriteLine("Starting service..."); _adapter = communicator.createObjectAdapter(name); ObjectFactoryForPropertyTypes factory = new ObjectFactoryForPropertyTypes(); ObjectFactoryForPropertyTypes.addFactoryToCommunicator( communicator, factory); Debug.WriteLine("Activating adapter..."); _adapter.activate(); reaper = new ReapThread(); reaperThread = new Thread(new ThreadStart(reaper.Run)); reaperThread.Start(); Debug.WriteLine("Registering boxes..."); registerBoxes(); if (havePropertyBoxes) { propertyReaper = new PropertyReapThread(); propertyReaperThread = new Thread(new ThreadStart(propertyReaper.Run)); propertyReaperThread.Start(); Debug.WriteLine("Registering property boxes..."); registerPropertyBoxes(); } }