/// <summary> /// Method setConnection /// </summary> /// <param name="socketName">A string</param> /// <param name="otherModule">A Ferda.Modules.BoxModulePrx</param> /// <param name="__current">An Ice.Current</param> public override void setConnection(String socketName, BoxModulePrx otherModule, Current __current) { if (! (socketName == "value")) { throw new Ferda.Modules.NameNotExistError(); } if(propertyValuePrx!= null && !propertySetByValue) { throw new Modules.ConnectionExistsError(); } Ice.ObjectPrx prx = otherModule.getFunctions(); if(!prx.ice_isA(this.propertyFunctionsIceIds[0])) throw new Ferda.Modules.BadTypeError(); if(propertyValuePrx != null && propertySetByValue) adapter.remove(propertyValuePrx.ice_getIdentity()); this.propertyValuePrx = prx; connectedBox = otherModule; this.propertySetByValue = false; }
/// <summary> /// Method removeConnection /// </summary> /// <param name="socketName">A string</param> /// <param name="boxModuleIceIdentity">A string</param> /// <param name="__current">An Ice.Current</param> public override void removeConnection(String socketName, String boxModuleIceIdentity, Current __current) { if (! (socketName == "value")) { throw new Ferda.Modules.NameNotExistError(); } if (propertyValuePrx == null || propertySetByValue || Ice.Util.identityToString(connectedBox.ice_getIdentity()) != boxModuleIceIdentity ) { throw new Modules.ConnectionNotExistError(); } connectedBox = null; this.setProperty("value",defaultValue); }