[omniORB] Multitier callings and callbacks

Denis Kokarev den@mkb.mari.ru
Tue, 29 Jun 1999 17:54:25 +0400


I want to make realize follows scheme:
Server object holds a reference to Factory object, Client make a Server call which makes a Factory
call
to return Result object.
Pseudo code descriptions :

class Result;
class Client;
class Server;
class Factory;

class Result {
    ....
}

class Client {
    // methods
    Server resolveServer();

    clientMethod() {
        ...
        Result = resolveServer()->getResult();
        ...
    }
}

class Server {
     // fields
     Factory factory;
     // methods
     Result getResult() {
         if (factory) {
             return factory->getResult();
         } else
             throw Exception("Factory not registered");
     }
     void registerFactory(Factory f) {
         factory = f;
     }
}

class Factory {
     // constructor
     Factory() {
         resolveServer()->registerFactory(this);
     }
     // methods
     Server resolveServer();

     Result getResult() {
         return new Result();
     }
}

Is it possible to realize multitier Result transmitting ? Or only client-server relations possible ?

If anybody have some answer give me a tip or working example, please.