Package logilab :: Package common :: Module corbautils
[frames] | no frames]

Module corbautils

source code

A set of utility function to ease the use of OmniORBpy.

Functions
 
get_orb()
returns a reference to the ORB.
source code
 
get_root_context()
returns a reference to the NameService object.
source code
 
register_object_name(object, namepath)
Registers a object in the NamingService.
source code
 
activate_POA()
This methods activates the Portable Object Adapter.
source code
 
run_orb()
Enters the ORB mainloop on the server.
source code
 
get_object_reference(url)
Resolves a corbaname URL to an object proxy.
source code
 
get_object_string(host, namepath)
given an host name and a name path as described in register_object_name,...
source code
Variables
  orb = None
hash(x)
Function Details

get_orb()

source code 

returns a reference to the ORB.
The first call to the method initialized the ORB
This method is mainly used internally in the module.

get_root_context()

source code 

returns a reference to the NameService object.
This method is mainly used internally in the module.

register_object_name(object, namepath)

source code 

Registers a object in the NamingService.
The name path is a list of 2-uples (id,kind) giving the path.

For instance if the path of an object is [('foo',''),('bar','')],
it is possible to get a reference to the object using the URL
'corbaname::hostname#foo/bar'.
[('logilab','rootmodule'),('chatbot','application'),('chatter','server')]
is mapped to
'corbaname::hostname#logilab.rootmodule/chatbot.application/chatter.server'

The get_object_reference() function can be used to resolve such a URL.

activate_POA()

source code 

This methods activates the Portable Object Adapter.
You need to call it to enable the reception of messages in your code,
on both the client and the server.

run_orb()

source code 

Enters the ORB mainloop on the server.
You should not call this method on the client.

get_object_reference(url)

source code 

Resolves a corbaname URL to an object proxy.
See register_object_name() for examples URLs

get_object_string(host, namepath)

source code 
given an host name and a name path as described in register_object_name,
return a corba string identifier