Does ICE have Smart Proxy?

dashiedashie Member Maurizio MerliOrganization: Università degli Studi di MilanoProject: N/A
Is there in ICE the CORBA smart proxy equivalent?

Somethig like this?
http://www.cs.wustl.edu/~schmidt/ACE_wrappers/TAO/docs/Smart_Proxies.html

They can be usefull to implement layer like cache, or other things similar.

Comments

  • marcmarc FloridaAdministrators, ZeroC Staff Marc LaukienOrganization: ZeroC, Inc.Project: The Internet Communications Engine ZeroC Staff
    Please see this post regarding our support policy here on these forums.
  • dashiedashie Member Maurizio MerliOrganization: Università degli Studi di MilanoProject: N/A
    I've updated my signature

    I've updated my signature
  • bernardbernard Jupiter, FLAdministrators, ZeroC Staff Bernard NormierOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi Maurizio,

    There is no smart proxy in Ice: we don't provide a way to customize the generated proxy classes and register them with the Ice runtime.

    Naturally, you could define your own proxy-wrapper class, and in your code use this proxy wrapper instead of Ice proxies directly. Another possibility, if you don't mind changing your Slice definitions, is to wrap the proxy in a class object. E.g. say you have:
    interface Person
    {
       // various operations
    };
    interface Registry
    {
       Person* find(string name);
    };
    

    You could change it to be:
    class Person
    {
         // various operations
        Person* proxy; // proxy to the remote Person
    };
    interface Registry
    {
        Person find(string name);
    };
    
    and the returned Person object behaves like a smart proxy.

    Cheers,
    Bernard
Sign In or Register to comment.