mapping object paths to method calls

Chris Rebert cvrebert at gmail.com
Sun Apr 9 12:09:43 PDT 2006


Dan -
I investigated ObjectTree, but unfortunately it's been removed from the 
Python bindings.

2005-04-25  John (J5) Palmieri  <johnp at redhat.com>

	* python/dbus.py: new version tuple "version" is set at (0, 40, 0)
	(ObjectTree): class removed for now

But Thiago's way should work fine for now.
Thanks for trying.
- Chris Rebert


Daniel P. Berrange wrote:
> On Sun, Apr 09, 2006 at 11:35:38AM +0200, Thiago Macieira wrote:
> 
>>Chris Rebert wrote:
>>
>>>My application will have a large database of objects accessible via an
>>>object path that incorporates their ids (e.g. /org/foo/bar/41254), and
>>>even using the flyweight pattern, I believe there would not be enough
>>>memory to register an object path for each object, therefore I would
>>>like to generate each object on demand if possible, as only a few of the
>>>many will be in use at any one time.
>>>If you have any ideas on how to accomplish this, I would be most
>>>appreciative.
>>
>>See above.
>>
>>Registering the object depends on how your binding does it. Technically 
>>speaking, with a message filter, you could catch the call to any object, 
>>without the need to call any specific "register object" function.
> 
> 
> The Python bindings already have support for exactly this capability. The
> ObjectTree class takes a base path, eg /org/foo/bar, and then handles
> calls for any object below this point, eg /org/foo/bar/41254 without needing
> any of the sub-objects to be explicitly registered - only the base path
> is registered.
> 
> Regards,
> Dan.
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> dbus mailing list
> dbus at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dbus


More information about the dbus mailing list