[omniORB] Interface inheritance and mutliple interfaces to a single servan
FloConsult SPRL
info@floconsult.be
Fri, 09 Mar 2001 12:38:19 +0100
I have a problem regarding interfaces separation in CORBA using Python
(and OmniORB, but this shouldn't change anything). =
I would like to offer two interfaces on the same object, one limited and
one enhanced. But if I try to bind on the limited interface, I get the
complete one.
In the FAQ, I saw a similar problem, but I want to have only one
servant, which is accessed by different interfaces.
Could you help me ?
I have the following IDL interface:
module toto {
interface Foo1{
void method1();
};
interface Foo2 : Foo1{
void method2();
};
}
The implementation file in Python is:
*************************************
import toto, toto_POA
class Foo2_i(RowingClub__POA.Foo2):
def method1(self):
#something
def method2(self):
#something
=
=3D> Foo1 and Foo2 are implemented in the same Foo2_i
On the server side, I use the POA:
**********************************
foo2Servant =3D Foo2_i()
foo2Ref =3D foo2Servant._this()
and for the moment I publish the ior from foo2Ref.
On the client side, I bind on the limited interface
(say the ior is stored in obj):
**********************************************************
foo1Itf =3D obj._narrow(toto.Foo1)
My problem is:
*************
dir(foo1Itf) gives 'method1' and 'method2', while I would like to
prevent users of this limited interface to use 'method2'.
Thanks in advance,
Isabelle.
mailto: isabelle.leclercq@floconsult.be
-- =
/\`. /\`. FloConsult SPRL
/ \ `. / \ `. http://www.floconsult.be
/ \ .=B4 / \ .=B4 mailto:info@floconsult.be
=B4------=B4 =B4------=B4 Tel. +32 2 390.07.89