Ming,
You can get the API documentation for the Python console interactively:
$ python
>>> from qmf.console import Session
>>> help(Session)
To answer your question, you can use the _objectId argument to get the
child object:
result = agents[0].create_child("xyz")
child = sess.getObjects(_objectId = result.childRef)[0]
-Ted
Ming Zhang wrote:
Hi All
I wonder how to use session getObject? What are those _class, _key means?
For example, I ran the qmf-agent example, then run the
qmf-console/console, it shows some agents i can play with.
Then I use python
agents = sess.getObjects(_class="parent",
_package="org.apache.qpid.agent.example")
I can get 3 agents which are core object #1 #2 #3, created by the
agent cpp code.
Then I invoked agents[0].create_child("xyz"), and got OK (0) -
{'childRef': 0-1-1-11-1}. So far so good.
But how could i get the child it just created?
Thanks!
Ming
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]