qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tr...@apache.org
Subject svn commit: r677408 - in /incubator/qpid/trunk/qpid/cpp: examples/qmf-agent/ src/qpid/agent/ src/qpid/broker/ src/qpid/management/
Date Wed, 16 Jul 2008 20:25:13 GMT
Author: tross
Date: Wed Jul 16 13:25:12 2008
New Revision: 677408

URL: http://svn.apache.org/viewvc?rev=677408&view=rev
Log:
QPID-1170 - Provide a better factory for creation and deletion of the management agent

Modified:
    incubator/qpid/trunk/qpid/cpp/examples/qmf-agent/example.cpp
    incubator/qpid/trunk/qpid/cpp/src/qpid/agent/ManagementAgent.h
    incubator/qpid/trunk/qpid/cpp/src/qpid/agent/ManagementAgentImpl.cpp
    incubator/qpid/trunk/qpid/cpp/src/qpid/agent/ManagementAgentImpl.h
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Bridge.cpp
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Broker.cpp
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Broker.h
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Connection.cpp
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Exchange.cpp
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Link.cpp
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Queue.cpp
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionState.cpp
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/System.cpp
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Vhost.cpp
    incubator/qpid/trunk/qpid/cpp/src/qpid/management/ManagementBroker.cpp
    incubator/qpid/trunk/qpid/cpp/src/qpid/management/ManagementBroker.h

Modified: incubator/qpid/trunk/qpid/cpp/examples/qmf-agent/example.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/examples/qmf-agent/example.cpp?rev=677408&r1=677407&r2=677408&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/examples/qmf-agent/example.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/examples/qmf-agent/example.cpp Wed Jul 16 13:25:12 2008
@@ -68,11 +68,12 @@
 // Main program
 //==============================================================
 int main(int argc, char** argv) {
+    ManagementAgent::Singleton singleton;
     const char* host = argc>1 ? argv[1] : "127.0.0.1";
     int port = argc>2 ? atoi(argv[2]) : 5672;
 
     // Create the qmf management agent
-    ManagementAgent* agent = new ManagementAgentImpl();
+    ManagementAgent* agent = singleton.getInstance();
 
     // Register the Qmf_example schema with the agent
     PackageQmf_example packageInit(agent);

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/agent/ManagementAgent.h
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/agent/ManagementAgent.h?rev=677408&r1=677407&r2=677408&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/agent/ManagementAgent.h (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/agent/ManagementAgent.h Wed Jul 16 13:25:12 2008
@@ -22,6 +22,7 @@
 
 #include "qpid/management/ManagementObject.h"
 #include "qpid/management/Manageable.h"
+#include "qpid/sys/Mutex.h"
 
 namespace qpid { 
 namespace management {
@@ -30,11 +31,21 @@
 {
   public:
 
+    class Singleton {
+    public:
+        Singleton(bool disableManagement = false);
+        ~Singleton();
+        static ManagementAgent* getInstance();
+    private:
+        static sys::Mutex lock;
+        static bool disabled;
+        static int refCount;
+        static ManagementAgent* agent;
+    };
+
     ManagementAgent () {}
     virtual ~ManagementAgent () {}
 
-    static ManagementAgent* getAgent();
-
     virtual int getMaxThreads() = 0;
 
     // Connect to a management broker

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/agent/ManagementAgentImpl.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/agent/ManagementAgentImpl.cpp?rev=677408&r1=677407&r2=677408&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/agent/ManagementAgentImpl.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/agent/ManagementAgentImpl.cpp Wed Jul 16 13:25:12
2008
@@ -33,14 +33,36 @@
 using std::cout;
 using std::endl;
 
-ManagementAgent* ManagementAgent::getAgent()
-{
-    //static ManagementAgent* agent = 0;
+Mutex            ManagementAgent::Singleton::lock;
+bool             ManagementAgent::Singleton::disabled = false;
+ManagementAgent* ManagementAgent::Singleton::agent    = 0;
+int              ManagementAgent::Singleton::refCount = 0;
+
+ManagementAgent::Singleton::Singleton(bool disableManagement)
+{
+    Mutex::ScopedLock _lock(lock);
+    if (disableManagement && !disabled) {
+        disabled = true;
+        assert(refCount == 0); // can't disable after agent has been allocated
+    }
+    if (refCount == 0 && !disabled)
+        agent = new ManagementAgentImpl();
+    refCount++;
+}
 
-    //if (agent == 0)
-    //    agent = new ManagementAgentImpl();
-    //return agent;
-    return 0;
+ManagementAgent::Singleton::~Singleton()
+{
+    Mutex::ScopedLock _lock(lock);
+    refCount--;
+    if (refCount == 0 && !disabled) {
+        delete agent;
+        agent = 0;
+    }
+}
+
+ManagementAgent* ManagementAgent::Singleton::getInstance()
+{
+    return agent;
 }
 
 ManagementAgentImpl::ManagementAgentImpl() :

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/agent/ManagementAgentImpl.h
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/agent/ManagementAgentImpl.h?rev=677408&r1=677407&r2=677408&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/agent/ManagementAgentImpl.h (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/agent/ManagementAgentImpl.h Wed Jul 16 13:25:12
2008
@@ -41,8 +41,8 @@
 {
   public:
 
-    ManagementAgentImpl ();
-    virtual ~ManagementAgentImpl ();
+    ManagementAgentImpl();
+    virtual ~ManagementAgentImpl();
 
     int getMaxThreads() { return 1; }
     void init(std::string brokerHost        = "localhost",

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Bridge.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Bridge.cpp?rev=677408&r1=677407&r2=677408&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Bridge.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Bridge.cpp Wed Jul 16 13:25:12 2008
@@ -40,7 +40,7 @@
     link(_link), id(_id), args(_args), mgmtObject(0),
     listener(l), name(Uuid(true).str()), persistenceId(0)
 {
-    ManagementAgent* agent = ManagementAgent::getAgent();
+    ManagementAgent* agent = ManagementAgent::Singleton::getInstance();
     if (agent != 0) {
         mgmtObject = new management::Bridge(agent, this, link, id, args.i_durable, args.i_src,
args.i_dest,
                                             args.i_key, args.i_srcIsQueue, args.i_srcIsLocal,
@@ -106,9 +106,8 @@
 
 void Bridge::setPersistenceId(uint64_t id) const
 {
-    if (mgmtObject != 0 && persistenceId == 0)
-    {
-        ManagementAgent* agent = ManagementAgent::getAgent ();
+    if (mgmtObject != 0 && persistenceId == 0) {
+        ManagementAgent* agent = ManagementAgent::Singleton::getInstance();
         agent->addObject (mgmtObject, id);
     }
     persistenceId = id;

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Broker.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Broker.cpp?rev=677408&r1=677407&r2=677408&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Broker.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Broker.cpp Wed Jul 16 13:25:12 2008
@@ -122,6 +122,7 @@
 Broker::Broker(const Broker::Options& conf) :
     poller(new Poller),
     config(conf),
+    managementAgentSingleton(!config.enableMgmt),
     store(0),
     dataDir(conf.noDataDir ? std::string () : conf.dataDir),
     links(this),
@@ -134,10 +135,10 @@
 {
     if(conf.enableMgmt){
         QPID_LOG(info, "Management enabled");
-        ManagementBroker::enableManagement (dataDir.isEnabled () ? dataDir.getPath () : string
(),
-                                            conf.mgmtPubInterval, this, conf.workerThreads
+ 3);
-        managementAgent = management::ManagementAgent::getAgent ();
-        ((ManagementBroker*) managementAgent)->setInterval (conf.mgmtPubInterval);
+        managementAgent = managementAgentSingleton.getInstance();
+        ((ManagementBroker*) managementAgent)->configure
+            (dataDir.isEnabled () ? dataDir.getPath () : string (),
+             conf.mgmtPubInterval, this, conf.workerThreads + 3);
         qpid::management::PackageQpid packageInitializer (managementAgent);
 
         System* system = new System (dataDir.isEnabled () ? dataDir.getPath () : string ());
@@ -294,7 +295,6 @@
         sasl_done();
 #endif
     }
-    ManagementBroker::shutdown();
     QPID_LOG(notice, "Shut down");
 }
 

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Broker.h
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Broker.h?rev=677408&r1=677407&r2=677408&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Broker.h (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Broker.h Wed Jul 16 13:25:12 2008
@@ -149,6 +149,7 @@
   private:
     boost::shared_ptr<sys::Poller> poller;
     Options config;
+    management::ManagementAgent::Singleton managementAgentSingleton;
     std::vector< boost::shared_ptr<sys::ProtocolFactory> > protocolFactories;
     MessageStore* store;
     DataDir dataDir;

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Connection.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Connection.cpp?rev=677408&r1=677407&r2=677408&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Connection.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Connection.cpp Wed Jul 16 13:25:12 2008
@@ -65,7 +65,7 @@
 
     if (parent != 0)
     {
-        ManagementAgent* agent = ManagementAgent::getAgent();
+        ManagementAgent* agent = ManagementAgent::Singleton::getInstance();
 
         if (agent != 0)
             mgmtObject = new management::Connection(agent, this, parent, mgmtId, !isLink);

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Exchange.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Exchange.cpp?rev=677408&r1=677407&r2=677408&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Exchange.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Exchange.cpp Wed Jul 16 13:25:12 2008
@@ -36,7 +36,7 @@
 {
     if (parent != 0)
     {
-        ManagementAgent* agent = ManagementAgent::getAgent ();
+        ManagementAgent* agent = ManagementAgent::Singleton::getInstance();
         if (agent != 0)
         {
             mgmtExchange = new management::Exchange (agent, this, parent, _name, durable);
@@ -51,7 +51,7 @@
 {
     if (parent != 0)
     {
-        ManagementAgent* agent = ManagementAgent::getAgent ();
+        ManagementAgent* agent = ManagementAgent::Singleton::getInstance();
         if (agent != 0)
         {
             mgmtExchange = new management::Exchange (agent, this, parent, _name, durable);
@@ -77,7 +77,7 @@
 {
     if (mgmtExchange != 0 && persistenceId == 0)
     {
-        ManagementAgent* agent = ManagementAgent::getAgent ();
+        ManagementAgent* agent = ManagementAgent::Singleton::getInstance();
         agent->addObject (mgmtExchange, id, 2);
     }
     persistenceId = id;
@@ -124,7 +124,7 @@
 {
     if (parent != 0)
     {
-        ManagementAgent* agent = ManagementAgent::getAgent ();
+        ManagementAgent* agent = ManagementAgent::Singleton::getInstance();
         if (agent != 0)
         {
             ManagementObject* mo = queue->GetManagementObject();

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Link.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Link.cpp?rev=677408&r1=677407&r2=677408&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Link.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Link.cpp Wed Jul 16 13:25:12 2008
@@ -59,7 +59,7 @@
 {
     if (parent != 0)
     {
-        ManagementAgent* agent = ManagementAgent::getAgent();
+        ManagementAgent* agent = ManagementAgent::Singleton::getInstance();
         if (agent != 0)
         {
             mgmtObject = new management::Link(agent, this, parent, _host, _port, _useSsl,
_durable);
@@ -264,10 +264,9 @@
 
 void Link::setPersistenceId(uint64_t id) const
 {
-    if (mgmtObject != 0 && persistenceId == 0)
-    {
-        ManagementAgent* agent = ManagementAgent::getAgent ();
-        agent->addObject (mgmtObject, id);
+    if (mgmtObject != 0 && persistenceId == 0) {
+        ManagementAgent* agent = ManagementAgent::Singleton::getInstance();
+        agent->addObject(mgmtObject, id);
     }
     persistenceId = id;
 }

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Queue.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Queue.cpp?rev=677408&r1=677407&r2=677408&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Queue.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Queue.cpp Wed Jul 16 13:25:12 2008
@@ -67,7 +67,7 @@
 {
     if (parent != 0)
     {
-        ManagementAgent* agent = ManagementAgent::getAgent ();
+        ManagementAgent* agent = ManagementAgent::Singleton::getInstance();
 
         if (agent != 0)
         {
@@ -576,7 +576,7 @@
 {
     if (mgmtObject != 0 && persistenceId == 0)
     {
-        ManagementAgent* agent = ManagementAgent::getAgent ();
+        ManagementAgent* agent = ManagementAgent::Singleton::getInstance();
         agent->addObject (mgmtObject, _persistenceId, 3);
 
         if (externalQueueStore) {

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionState.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionState.cpp?rev=677408&r1=677407&r2=677408&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionState.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SessionState.cpp Wed Jul 16 13:25:12 2008
@@ -62,7 +62,7 @@
 {
     Manageable* parent = broker.GetVhostObject ();
     if (parent != 0) {
-        ManagementAgent* agent = ManagementAgent::getAgent ();
+        ManagementAgent* agent = ManagementAgent::Singleton::getInstance();
         if (agent != 0) {
             mgmtObject = new management::Session (agent, this, parent, getId().getName());
             mgmtObject->set_attached (0);

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/System.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/System.cpp?rev=677408&r1=677407&r2=677408&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/System.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/System.cpp Wed Jul 16 13:25:12 2008
@@ -30,7 +30,7 @@
 
 System::System (string _dataDir) : mgmtObject(0)
 {
-    ManagementAgent* agent = ManagementAgent::getAgent ();
+    ManagementAgent* agent = ManagementAgent::Singleton::getInstance();
 
     if (agent != 0)
     {

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Vhost.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Vhost.cpp?rev=677408&r1=677407&r2=677408&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Vhost.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/Vhost.cpp Wed Jul 16 13:25:12 2008
@@ -27,7 +27,7 @@
 {
     if (parentBroker != 0)
     {
-        ManagementAgent* agent = ManagementAgent::getAgent ();
+        ManagementAgent* agent = ManagementAgent::Singleton::getInstance();
 
         if (agent != 0)
         {

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/management/ManagementBroker.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/management/ManagementBroker.cpp?rev=677408&r1=677407&r2=677408&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/management/ManagementBroker.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/management/ManagementBroker.cpp Wed Jul 16 13:25:12
2008
@@ -38,25 +38,83 @@
 using namespace qpid::sys;
 using namespace std;
 
-ManagementAgent* ManagementBroker::agent;
-bool             ManagementBroker::enabled = 0;
+Mutex            ManagementAgent::Singleton::lock;
+bool             ManagementAgent::Singleton::disabled = false;
+ManagementAgent* ManagementAgent::Singleton::agent    = 0;
+int              ManagementAgent::Singleton::refCount = 0;
+
+ManagementAgent::Singleton::Singleton(bool disableManagement)
+{
+    Mutex::ScopedLock _lock(lock);
+    if (disableManagement && !disabled) {
+        disabled = true;
+        assert(refCount == 0); // can't disable after agent has been allocated
+    }
+    if (refCount == 0 && !disabled)
+        agent = new ManagementBroker();
+    refCount++;
+}
+
+ManagementAgent::Singleton::~Singleton()
+{
+    Mutex::ScopedLock _lock(lock);
+    refCount--;
+    if (refCount == 0 && !disabled) {
+        delete agent;
+        agent = 0;
+    }
+}
+
+ManagementAgent* ManagementAgent::Singleton::getInstance()
+{
+    return agent;
+}
 
 ManagementBroker::RemoteAgent::~RemoteAgent ()
 {
     if (mgmtObject != 0)
-        mgmtObject->resourceDestroy ();
+        mgmtObject->resourceDestroy();
 }
 
-ManagementBroker::ManagementBroker (string _dataDir, uint16_t _interval, Manageable* _broker,
int _threads) :
-    threadPoolSize(_threads), dataDir(_dataDir), interval(_interval), broker(_broker)
+ManagementBroker::ManagementBroker () :
+    threadPoolSize(1), interval(10), broker(0)
 {
-    timer.add (intrusive_ptr<TimerTask> (new Periodic(*this, interval)));
     localBank      = 5;
     nextObjectId   = 1;
     bootSequence   = 1;
     nextRemoteBank = 10;
     nextRequestSequence = 1;
     clientWasAdded = false;
+}
+
+ManagementBroker::~ManagementBroker ()
+{
+    Mutex::ScopedLock lock (userLock);
+
+    // Reset the shared pointers to exchanges.  If this is not done now, the exchanges
+    // will stick around until dExchange and mExchange are implicitely destroyed (long
+    // after this destructor completes).  Those exchanges hold references to management
+    // objects that will be invalid.
+    dExchange.reset();
+    mExchange.reset();
+
+    moveNewObjectsLH();
+    for (ManagementObjectMap::iterator iter = managementObjects.begin ();
+         iter != managementObjects.end ();
+         iter++) {
+        ManagementObject* object = iter->second;
+        delete object;
+    }
+    managementObjects.clear();
+}
+
+void ManagementBroker::configure(string _dataDir, uint16_t _interval, Manageable* _broker,
int _threads)
+{
+    dataDir        = _dataDir;
+    interval       = _interval;
+    broker         = _broker;
+    threadPoolSize = _threads;
+    timer.add (intrusive_ptr<TimerTask> (new Periodic(*this, interval)));
 
     // Get from file or generate and save to file.
     if (dataDir.empty ())
@@ -92,20 +150,6 @@
     }
 }
 
-ManagementBroker::~ManagementBroker ()
-{
-    Mutex::ScopedLock lock (userLock);
-
-    moveNewObjectsLH();
-    for (ManagementObjectMap::iterator iter = managementObjects.begin ();
-         iter != managementObjects.end ();
-         iter++) {
-        ManagementObject* object = iter->second;
-        delete object;
-    }
-    managementObjects.clear();
-}
-
 void ManagementBroker::writeData ()
 {
     string   filename (dataDir + "/.mbrokerdata");
@@ -118,31 +162,6 @@
     }
 }
 
-void ManagementBroker::enableManagement (string dataDir, uint16_t interval, Manageable* broker,
int threadPoolSize)
-{
-    enabled = 1;
-    if (agent == 0)
-        agent = new ManagementBroker (dataDir, interval, broker, threadPoolSize);
-}
-
-ManagementAgent* ManagementAgent::getAgent (void)
-{
-    return ManagementBroker::agent;
-}
-
-void ManagementBroker::shutdown (void)
-{
-    if (agent != 0)
-    {
-        ManagementBroker* broker = (ManagementBroker*) agent;
-
-        broker->mExchange.reset ();
-        broker->dExchange.reset ();
-        delete agent;
-        agent = 0;
-    }
-}
-
 void ManagementBroker::setExchange (broker::Exchange::shared_ptr _mexchange,
                                     broker::Exchange::shared_ptr _dexchange)
 {

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/management/ManagementBroker.h
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/management/ManagementBroker.h?rev=677408&r1=677407&r2=677408&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/management/ManagementBroker.h (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/management/ManagementBroker.h Wed Jul 16 13:25:12
2008
@@ -39,17 +39,14 @@
 {
   private:
 
-    ManagementBroker (std::string dataDir, uint16_t interval, Manageable* broker, int threadPoolSize);
     int threadPoolSize;
 
   public:
 
+    ManagementBroker ();
     virtual ~ManagementBroker ();
 
-    static void enableManagement (std::string dataDir, uint16_t interval, Manageable* broker,
int threadPoolSize);
-    static ManagementAgent* getAgent (void);
-    static void shutdown (void);
-
+    void configure       (std::string dataDir, uint16_t interval, Manageable* broker, int
threadPoolSize);
     void setInterval     (uint16_t _interval) { interval = _interval; }
     void setExchange     (broker::Exchange::shared_ptr mgmtExchange,
                           broker::Exchange::shared_ptr directExchange);



Mime
View raw message