Hello Arnuad,
I uploaded the code on the JIRA 955.
There are three main files:
1. QueryListener which creates the three queues (management, reply,
testQueue) and prompts user to quey (e.g. package, schema, method etc) and
put the schema into the property file 2. ManagementListener this listens
the Configuration and Instrumentation Content Messages for all the class
that the broker knows. In the present situation, it gets all the attributes
for the queue (testQueue) and write into the property file so that we can
expose it (by using ExposeMBean.java) 3. ExposeMBean is used to get the
elements from the property file and expose them on the JMX agent by Running
(ExposeMBeanMain.java)
You can open the jconsole to view all the elements of the queue class
testQueue, you can also invoke the purge method by supplying an
argument request (number of messages you want to delete). This change
will directly reflect into the broker.
Please note: you cannot modify the elements value via console as this
setAttribute() mapping is not implemented in the broker. (as Ted confirmed)
One last thing, if you run these program then please change the objectID in
the QueryListener, ManagementListener and ExposeQueue for the testQueue
queue (as it is hardcoded) but in the next version it would be dynamic.
(with all the classes)
There is one more program, which I reuse from already existing api is
DirectProducer for testing which is used to put few messages in the
testQueue
How to run this:
1. Run the QueryListener.java if you want to send any management request
and receive the management response on the reply queue. This will create
the queues automatically by calling Queue.java
2. Run the ManagementListener if you want to receive the sporadic
Configuration and Instrumentation Content Messages for all the class that
the broker knows. It will also create the queues.
3. You can run the qpid-tool to see the objectId of the testQueue and
change in the all three files (QueryListener.java, ManagementListener and
ExposeMBean.java) as it is hard coded for the time being.  . but in
the next version will be fixed.
4. Run the DirectProducer.java to put some messages in the testQueue
5. step -2
6. see in the directory structure ./conf/exposeProperty.prop file, you will
receive the all queue elements in it.
7. run the ExposeMBeanMain.java to expose all the elements of the property
file on JMX agent
8. open jconsole and view all elements of the queue, you can also invoke
the purge method to purge the messaged from the testQueue
Next Step- by next week I am hoping to expose all the classes dynamically
and fix issues.
Thanks to Ted for guiding me and notifying the changes in management
protocol otherwise I was caught with the old version of broker and apis.
You feedback is required.
Thanks.
BR,
Rahul