Beispiel #1
0
 public void response_SBaseAsObject(Ice.Object o)
 {
     AllTests.test(o != null);
     AllTests.test(o.ice_id().Equals("::Test::SBase"));
     SBase sb = (SBase) o;
     AllTests.test(sb != null);
     AllTests.test(sb.sb.Equals("SBase.sb"));
     callback.called();
 }
Beispiel #2
0
 public static DispatchStatus ice_id___(Ice.Object __obj, IceInternal.Incoming inS__, Current __current)
 {
     inS__.readEmptyParams();
     string __ret = __obj.ice_id(__current);
     IceInternal.BasicStream os__ = inS__.startWriteParams__(FormatType.DefaultFormat);
     os__.writeString(__ret);
     inS__.endWriteParams__(true);
     return DispatchStatus.DispatchOK;
 }
Beispiel #3
0
 public override void patch(Ice.Object v)
 {
     try
     {
         switch(_member)
         {
         case 0:
             _instance.node = (minie.irpc.cm_node_rpc)v;
             break;
         case 1:
             _instance.user = (minie.irpc.cm_user_rpc)v;
             break;
         case 2:
             _instance.creator = (minie.irpc.sys_user_rpc)v;
             break;
         }
     }
     catch(_System.InvalidCastException)
     {
         IceInternal.Ex.throwUOE(type(), v.ice_id());
     }
 }
Beispiel #4
0
 public override void patch(Ice.Object v)
 {
     try
     {
         switch(_member)
         {
         case 0:
             _instance.role = (minie.irpc.sys_role_rpc)v;
             break;
         case 1:
             _instance.perm = (minie.irpc.sys_permission_rpc)v;
             break;
         }
     }
     catch(_System.InvalidCastException)
     {
         IceInternal.Ex.throwUOE(type(), v.ice_id());
     }
 }
Beispiel #5
0
 public override void patch(Ice.Object v)
 {
     try
     {
         _instance.creator = (minie.irpc.sys_user_rpc)v;
     }
     catch(_System.InvalidCastException)
     {
         IceInternal.Ex.throwUOE(type(), v.ice_id());
     }
 }
        public Ice.ObjectPrx register(string Name, Ice.Object servant, bool icegrid = true)
        {
            // register an object to local Ice adapter and yellowpage service (IceGrid)

            Ice.Identity iceid = Communicator.stringToIdentity(Name);
            logger.Info("Registering: " + Name);//+ " with ice_id: " + iceid.ToString());
            Ice.ObjectPrx proxy;
            try
            {
                proxy = _Adapter.add(servant, iceid);
            }
            catch (Ice.AlreadyRegisteredException ex)
            {
                logger.Error("The name of this holon: " + iceid.ToString() + " is allready used in local adapter");
                //maybe I could try to change name but there is probably something wrong
                throw (ex);
            }

            // It is very important to deregister objects before closing!!
            // Otherwise ghost links are created
            IceGrid.AdminPrx admin = getIceGridAdmin();
            try
            {
                admin.addObjectWithType(proxy, servant.ice_id());
            }
            catch (IceGrid.ObjectExistsException)
            {
                admin.updateObject(proxy);
            }
            _ServantIds.Add(iceid);
            return proxy;
        }
Beispiel #7
0
 public static DispatchStatus ice_id___(Ice.Object __obj, IceInternal.Incoming inS__,
     Current __current)
 {
     inS__.istr().skipEmptyEncaps();
     string __ret = __obj.ice_id(__current);
     IceInternal.BasicStream os__ = inS__.ostr();
     os__.writeString(__ret);
     return DispatchStatus.DispatchOK;
 }