Archived
This forum has been archived. Please start a new discussion on GitHub.
why cast
I was wondering, why the the following process at client side has to be made (also in CORBA):
1- ObjectPrx reference
2 - narrow to MyInterfacePrx
Why do mappings not provide a direct resolving feature like:
MyInterfacePrx..ic.stringToProxy(....);
1- ObjectPrx reference
2 - narrow to MyInterfacePrx
Why do mappings not provide a direct resolving feature like:
MyInterfacePrx..ic.stringToProxy(....);
0
Comments
-
Hi Rodolfo,
Welcome to our forums!
Usually you pass proxies around as proxies, so there is no need to call stringToProxy or perform any casting.
However, Ice also provides a way to represent a proxy as a printable ASCII string. This is typically used for bootstrap: you manufacture proxies for a few root objects, and get proxies to other objects from them.
This is done through stringToProxy or propertyToProxy on the communicator object. I guess we could have casts that perform also stringToProxy, i.e.:MyInterfacePrx obj = MyInterfacePrx.checkedStringToProxy(ic, str);
but this doesn't sound more convenient than:MyInterfacePrx obj = MyInterfacePrx.checkedCast(ic.stringToProxy(str));
Cheers,
Bernard0 -
Thanks
Regards,
Rodolfo0