You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by xinfang <pc...@gmail.com> on 2009/10/19 19:12:42 UTC

QMF-agent logic.


now I review the QMF Agent part code . and try to understand the logic.
before I thought I need to write a agent code to implement my require ,my
require want to get Queue's byteTotalEnqueues and byteTotalDequeues data. 
but i found out in the broker side code , there have a default agent code is
implement it. I only need to go to understand how to uses agent to get data 
, before I uses console can get data but not get sync real time queue info
data. 

-------------  1 -----------------------------------------
in cpp/src/gen/qmf/org/apache/qpid/broker have  these class
Queue.cpp
EventQueueDeclare.cpp

ManagementObject is base object for broker even , Queue is inherit
ManagementObject class. and Queue need to implement writeProperties and
writeStatistics function . beucase two function will be return data to
client.

**** I thought these class are integration in broker side. and register the
event. when Client invoke the method.

but when I go to looking at QMF-agent sample code ,I also found out in
example subdirectory have same sample class 
child.h 
EventChildCreated.cpp
it also inherit ManagermentObject class, it return some objecid count info. 
and example.cpp to register the child object and return the data.

**** if qmf-agent sample is client side , then Queue.cpp and child.cpp are
not integration in broker . only client to implement them. so if I want to
write a new agent to return some data. we need to do 

1. write a class to inherit managementobject.  such as Child.h /Queue.h
(this step we can define a xml scheme to create the class)
2. write some relationship classes ,such as
EventQueueDeclare/EventChildCreate  , EventQueueDestroyed and
EventQueueDelete.etc...
3. write some Wrapper classes to register and bind to Queue or child class
.(this step I didn't understand)
4. write some class get data or write a console to get data. 

Would that steps are correct?

-------------  2 -----------------------------------------
cpp/src/qpid/agent folder

this folder class is agent API  for client. in my mind: client uses this
class register the class and event,  uses give the namespace which class is
register. 


Does console is base on agent.? In my mind I think it’s 



-- 
View this message in context: http://n2.nabble.com/QMF-agent-logic-tp3850330p3850330.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org