Re: How do I discover which interfaces an ORBit object implements?
- From: Michael Meeks <michael ximian com>
- To: orbit-list gnome org
- Cc: Adam Buckley <adambuckley gmx net>
- Subject: Re: How do I discover which interfaces an ORBit object implements?
- Date: 07 Jan 2002 09:59:27 +0000
Hi Adam,
On Sat, 2002-01-05 at 23:27, Adam Buckley wrote:
> When I register a JDK1.3 CORBA server with the JDK1.3 name server, I can
> discover the list of interfaces the server object satisfies by doing:
>
> String[] ids = obj._ids();
> for(int i = 0; i<ids.length; i++)
> System.out.println(ids[i]);
Interesting.
> > IDL:com/blah/DerivedClass3:1.0
> > IDL:com/blah/DerivedClass2:1.0
> > IDL:com/blah/DerivedClass1:1.0
> > IDL:com/blah/BaseClass:1.0
>
>
> However, when I register an ORBit-0.5.12 CORBA server with the same name
> server, I only get:
>
> > omg.org/CORBA/Object:1.0
This is most likely because we don't implement the get_interface method
on the Object; sadly we don't (yet) implement this in ORBit2 - although
in that case we have all the hooks ready to do such a thing properly.
> Is there any way to get ORBit or orbit-idl to include such inheritance
> information? Failing that, it there any way I can hard-code the interface
> names in the server.c code?
It's going to be hard in ORBit I think; You prolly need to switch to a
method that uses 'is_a' instead of get_interface_method - how to do that
I know not; ie. it is quite possible to do CORBA_Object_is_a (obj,
"IDL:Foo/Baa:1.0");
> I need this info because my 'controller' invokes the server objects
> differently based on which interfaces they satisfy.
Sure - I hope the is_a method is exposed by your binding somehow.
HTH,
Michael.
--
mmeeks@gnu.org <><, Pseudo Engineer, itinerant idiot
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]