diff options
author | Andrew Stitcher <astitcher@apache.org> | 2013-07-26 21:31:25 +0000 |
---|---|---|
committer | Andrew Stitcher <astitcher@apache.org> | 2013-07-26 21:31:25 +0000 |
commit | 183c061a2610c29dda77e2d8b9193e5a9d1192b5 (patch) | |
tree | f76476df3e008fd8b71c66dc2baa0ca25da44b45 | |
parent | 5fdef74d79857287d64b87c748929afa2d75f497 (diff) | |
download | qpid-python-183c061a2610c29dda77e2d8b9193e5a9d1192b5.tar.gz |
QPID-4940: Remove qmf1 console code
QPID-4941: Remove qmf1 console examples
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1507467 13f79535-47bb-0310-9956-ffa450edef68
40 files changed, 2 insertions, 5936 deletions
diff --git a/cpp/examples/CMakeLists.txt b/cpp/examples/CMakeLists.txt index 4f30be991d..3c4b4039d4 100644 --- a/cpp/examples/CMakeLists.txt +++ b/cpp/examples/CMakeLists.txt @@ -90,5 +90,5 @@ if (MSVC) COMPONENT ${QPID_COMPONENT_EXAMPLES}) endif (MSVC) -add_subdirectory(qmf-console) add_subdirectory(messaging) + diff --git a/cpp/examples/qmf-console/CMakeLists.txt b/cpp/examples/qmf-console/CMakeLists.txt deleted file mode 100644 index 3b74338221..0000000000 --- a/cpp/examples/qmf-console/CMakeLists.txt +++ /dev/null @@ -1,23 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -add_installed_example(qmf-console console qmfconsole) -add_installed_example(qmf-console printevents qmfconsole) -add_installed_example(qmf-console ping qmfconsole) -add_installed_example(qmf-console queuestats qmfconsole) diff --git a/cpp/examples/qmf-console/README.txt b/cpp/examples/qmf-console/README.txt deleted file mode 100644 index 2ee784cbc2..0000000000 --- a/cpp/examples/qmf-console/README.txt +++ /dev/null @@ -1,39 +0,0 @@ -The QMF console library provides an interface infrastructure for -broker management. This directory contains example applications that -use the QMF console library to interact with the broker. - -cluster-qmon.cpp: -This example maintains connections to a number of brokers (assumed to -be running on localhost and at ports listed in the command line -arguments). The program then periodically polls queue information -from a single operational broker. This is a useful illustration of -how one might monitor statistics on a cluster of brokers. - -console.cpp: -A simple application that attaches to a broker (assumed to be -available as "localhost:5672"), and extracts: - * Management Schema (packages and classes) - * Management state for all active Exchanges - * Management state for all active Queues -It then invokes the broker's "echo" test method before detaching from -the broker. - -ping.cpp: -Connects to a broker (assumed to be available as "localhost:5672"), -and invokes the "echo" test method five times. - -printevents.cpp: -An example of a passive broker monitor. This application connects to -a broker (assumed to be available as "localhost:5672"), and registers -a callback listener. The listener's callbacks are invoked when -various management events are signalled by the broker. - -queuestats.cpp: -An example of a passive broker monitor. This application connects to -a broker (assumed to be available as "localhost:5672"), and registers -a callback listener for status updates only for Queue objects. The -listener's callback is invoked whenever the status of a Queue -changes. - - - diff --git a/cpp/examples/qmf-console/cluster-qmon.cpp b/cpp/examples/qmf-console/cluster-qmon.cpp deleted file mode 100644 index fe92f8a8ae..0000000000 --- a/cpp/examples/qmf-console/cluster-qmon.cpp +++ /dev/null @@ -1,179 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ - -#include "qpid/console/ConsoleListener.h" -#include "qpid/console/SessionManager.h" -#include "qpid/sys/Time.h" -#include "qpid/sys/Mutex.h" -#include <signal.h> -#include <map> - -using namespace std; -using namespace qpid::console; -using qpid::sys::Mutex; - -// -// This example maintains connections to a number of brokers (assumed -// to be running on localhost and at ports listed in the command line -// arguments). -// -// The program then periodically polls queue information from a -// single operational broker. This is a useful illustration of how -// one might monitor statistics on a cluster of brokers. -// - -//============================================================== -// Main program -//============================================================== - -// -// The Main class extends ConsoleListener so it can receive broker connected/disconnected -// notifications. -// -class Main : public ConsoleListener { - bool stopping; // Used to tell the program to exit - Mutex lock; // Mutex to protect the broker-map - map<Broker*, bool> brokerMap; // Map of broker-pointers to boolean "operational" status - -public: - Main() : stopping(false) {} - - /** Invoked when a connection is established to a broker - */ - void brokerConnected(const Broker& broker) - { - Mutex::ScopedLock l(lock); - brokerMap[const_cast<Broker*>(&broker)] = true; - } - - /** Invoked when the connection to a broker is lost - */ - void brokerDisconnected(const Broker& broker) - { - Mutex::ScopedLock l(lock); - brokerMap[const_cast<Broker*>(&broker)] = false; - } - - int run(int argc, char** argv) - { - // - // Tune the settings for this application: We will operate synchronously only, we don't - // wish to use the bandwidth needed to aysnchronously receive objects or events. - // - SessionManager::Settings sessionSettings; - sessionSettings.rcvObjects = false; - sessionSettings.rcvEvents = false; - sessionSettings.rcvHeartbeats = false; - - SessionManager sm(this, sessionSettings); - - // - // Connect to the brokers. - // - for (int idx = 1; idx < argc; idx++) { - qpid::client::ConnectionSettings connSettings; - connSettings.host = "localhost"; - connSettings.port = atoi(argv[idx]); - Broker* broker = sm.addBroker(connSettings); - - Mutex::ScopedLock l(lock); - brokerMap[broker] = false; // initially assume broker is disconnected - } - - // - // Periodically poll the first connected broker. - // - while (!stopping) { - // - // Find an operational broker - // - Broker* operationalBroker = 0; - { - Mutex::ScopedLock l(lock); - for (map<Broker*, bool>::iterator iter = brokerMap.begin(); - iter != brokerMap.end(); iter++) { - if (iter->second) { - operationalBroker = iter->first; - break; - } - } - } - - if (operationalBroker != 0) { - Object::Vector list; - sm.getObjects(list, "queue", operationalBroker); - for (Object::Vector::iterator i = list.begin(); i != list.end(); i++) { - cout << "queue: " << i->attrString("name"); - cout << " bindingCount=" << i->attrUint64("bindingCount") << endl; - } - } else { - cout << "No operational brokers" << endl; - } - - qpid::sys::sleep(10); - if (stopping) - break; - } - - { - // - // The following code structure uses the mutex to protect the broker map while - // ensuring that sm.delBroker is called without the mutex held (which leads to - // a deadlock). - // - Mutex::ScopedLock l(lock); - map<Broker*, bool>::iterator iter = brokerMap.begin(); - while (iter != brokerMap.end()) { - Broker* broker = iter->first; - brokerMap.erase(iter); - { - Mutex::ScopedUnlock ul(lock); - sm.delBroker(broker); - } - iter = brokerMap.begin(); - } - } - - return 0; - } - - void stop() { - stopping = true; - } -}; - -Main main_program; - -void signal_handler(int) -{ - main_program.stop(); -} - -int main(int argc, char** argv) -{ - signal(SIGINT, signal_handler); - try { - return main_program.run(argc, argv); - } catch(std::exception& e) { - cout << "Top Level Exception: " << e.what() << endl; - } -} - diff --git a/cpp/examples/qmf-console/console.cpp b/cpp/examples/qmf-console/console.cpp deleted file mode 100644 index b5375b673f..0000000000 --- a/cpp/examples/qmf-console/console.cpp +++ /dev/null @@ -1,151 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ - -#include "qpid/console/ConsoleListener.h" -#include "qpid/console/SessionManager.h" - -using namespace std; -using namespace qpid::console; - -class Listener : public ConsoleListener { -public: - ~Listener() {} - - void brokerConnected(const Broker& broker) { - cout << "brokerConnected: " << broker << endl; - } - - void brokerDisconnected(const Broker& broker) { - cout << "brokerDisconnected: " << broker << endl; - } - - void newPackage(const std::string& name) { - cout << "newPackage: " << name << endl; - } - - void newClass(const ClassKey& classKey) { - cout << "newClass: key=" << classKey << endl; - } - - void newAgent(const Agent& agent) { - cout << "newAgent: " << agent << endl; - } - - void delAgent(const Agent& agent) { - cout << "delAgent: " << agent << endl; - } - - void objectProps(Broker& broker, Object& object) { - cout << "objectProps: broker=" << broker << " object=" << object << endl; - } - - void objectStats(Broker& broker, Object& object) { - cout << "objectStats: broker=" << broker << " object=" << object << endl; - } - - void event(Event& event) { - cout << "event: " << event << endl; - } -}; - - -//============================================================== -// Main program -//============================================================== -int main_int(int /*argc*/, char** /*argv*/) -{ - //Listener listener; - qpid::client::ConnectionSettings settings; - - cout << "Creating SessionManager" << endl; - SessionManager sm; - cout << "Adding broker" << endl; - Broker* broker; - - broker = sm.addBroker(settings); - broker->waitForStable(); - - cout << "Package List:" << endl; - vector<string> packages; - sm.getPackages(packages); - for (vector<string>::iterator iter = packages.begin(); iter != packages.end(); iter++) { - cout << " " << *iter << endl; - SessionManager::KeyVector classKeys; - sm.getClasses(classKeys, *iter); - for (SessionManager::KeyVector::iterator cIter = classKeys.begin(); - cIter != classKeys.end(); cIter++) - cout << " " << *cIter << endl; - } - - Object::Vector list; - cout << "getting exchanges..." << endl; - sm.getObjects(list, "exchange"); - cout << " returned " << list.size() << " elements" << endl; - - for (Object::Vector::iterator i = list.begin(); i != list.end(); i++) { - cout << "exchange: " << *i << endl; - } - - list.clear(); - cout << "getting queues..." << endl; - sm.getObjects(list, "queue"); - cout << " returned " << list.size() << " elements" << endl; - - for (Object::Vector::iterator i = list.begin(); i != list.end(); i++) { - cout << "queue: " << *i << endl; - cout << " bindingCount=" << i->attrUint("bindingCount") << endl; - cout << " arguments=" << i->attrMap("arguments") << endl; - } - - list.clear(); - sm.getObjects(list, "broker"); - if (list.size() == 1) { - Object& broker = *list.begin(); - - cout << "Broker: " << broker << endl; - - Object::AttributeMap args; - MethodResponse result; - args.addUint("sequence", 1); - args.addString("body", "Testing..."); - - cout << "Call echo method..." << endl; - broker.invokeMethod("echo", args, result); - cout << "Result: code=" << result.code << " text=" << result.text << endl; - for (Object::AttributeMap::iterator aIter = result.arguments.begin(); - aIter != result.arguments.end(); aIter++) { - cout << " Output Arg: " << aIter->first << " => " << aIter->second->str() << endl; - } - } - - sm.delBroker(broker); - return 0; -} - -int main(int argc, char** argv) -{ - try { - return main_int(argc, argv); - } catch(std::exception& e) { - cout << "Top Level Exception: " << e.what() << endl; - } -} - diff --git a/cpp/examples/qmf-console/ping.cpp b/cpp/examples/qmf-console/ping.cpp deleted file mode 100644 index e6d6d138d5..0000000000 --- a/cpp/examples/qmf-console/ping.cpp +++ /dev/null @@ -1,133 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ - -#include "qpid/console/SessionManager.h" -#include "qpid/sys/Time.h" - -using namespace std; -using namespace qpid::console; - -//============================================================== -// Main program -//============================================================== -int main_int(int /*argc*/, char** /*argv*/) -{ - // - // Declare connection settings for the messaging broker. - // - qpid::client::ConnectionSettings connSettings; - - // - // Declare the (optional) session manager settings. Override the default timeout - // for methods calls to be 2 seconds. - // - SessionManager::Settings smSettings; - smSettings.methodTimeout = 2; - smSettings.getTimeout = 2; - - // - // Declare the console session manager. With a null listener argument, it defaults to - // synchronous-only access mode. - // - SessionManager sm(0, smSettings); - - // - // Add a broker connection to the session manager. - // - Broker* broker = sm.addBroker(connSettings); - broker->waitForStable(); - - uint32_t count = 5; // The number of echo requests we will send to the broker. - Object::Vector list; // A container for holding objects retrieved from the broker. - - for (uint32_t iter = 0; iter < count; iter++) { - cout << "Ping Broker: " << broker->getUrl() << "... "; - cout.flush(); - - // - // Query for a list of 'broker' objects from the Management Database - // - sm.getObjects(list, "broker"); - - // - // We expect one object (since we are connected to only one broker) - // - if (list.size() == 1) { - Object& brokerObject = *(list.begin()); - - // - // Declare a container for arguments to be sent with the "echo" method - // that we will invoke on the remote "broker" object. - // - Object::AttributeMap args; - - // - // Declare a container for the result of the method invocation. - // - MethodResponse result; - - // - // Set the values of the input arguments. - // - args.addUint("sequence", iter); - args.addString("body", "ABCDEFGHIJKLMNOPQRSTUVWXYZ"); - - // - // Invoke the method. This is a synchronous operation that will block until - // the method completes and returns a result. - // - brokerObject.invokeMethod("echo", args, result); - - // - // result.code is the return code (0 => Success) - // result.text is the return text - // result.arguments is a container (of type Object::AttributeMap) that holds - // the output arguments (if any) from the method. - // - cout << "Result: code=" << result.code << " text=" << result.text; - if (result.code == 0) - cout << " seq=" << result.arguments["sequence"]->asUint(); - cout << endl; - - if (result.code == 0 && iter < count - 1) - qpid::sys::sleep(1); - } else { - cout << "Disconnected..." << endl; - qpid::sys::sleep(1); - } - } - - // - // Disconnect the broker from the session manager. - // - sm.delBroker(broker); - return 0; -} - -int main(int argc, char** argv) -{ - try { - return main_int(argc, argv); - } catch(std::exception& e) { - cout << "Top Level Exception: " << e.what() << endl; - } -} - diff --git a/cpp/examples/qmf-console/printevents.cpp b/cpp/examples/qmf-console/printevents.cpp deleted file mode 100644 index ac3e449a2c..0000000000 --- a/cpp/examples/qmf-console/printevents.cpp +++ /dev/null @@ -1,123 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ - -#include "qpid/console/ConsoleListener.h" -#include "qpid/console/SessionManager.h" -#include "qpid/sys/Time.h" -#include <signal.h> - -using namespace std; -using namespace qpid::console; - -// -// Define a listener class to receive asynchronous events. -// -class Listener : public ConsoleListener { -public: - void brokerConnected(const Broker& broker) { - cout << qpid::sys::now() << " NOTIC qpid-printevents:brokerConnected broker=" << - broker.getUrl() << endl; - } - - void brokerDisconnected(const Broker& broker) { - cout << qpid::sys::now() << " NOTIC qpid-printevents:brokerDisconnected broker=" << - broker.getUrl() << endl; - } - - void event(Event& event) { - cout << event << endl; - } -}; - - -//============================================================== -// Main program -//============================================================== -struct Main { - bool stopping; - - Main() : stopping(false) {} - - int run(int /*argc*/, char** /*argv*/) - { - // - // Declare an instance of our listener. - // - Listener listener; - - // - // Declare connection settings for the messaging broker. - // - qpid::client::ConnectionSettings connSettings; - - // - // Declare the (optional) session manager settings. Disable the reception of - // object updates and heartbeats. Note that by disabling the reception of things - // we don't need, we don't unnecessarily use network bandwidth. - // - SessionManager::Settings smSettings; - smSettings.rcvObjects = false; - smSettings.rcvHeartbeats = false; - - // - // Declare the console session manager. - // - SessionManager sm(&listener, smSettings); - - // - // Add a broker connection to the session manager. If desired, multiple brokers may - // be connected. - // - Broker* broker = sm.addBroker(connSettings); - - // - // Sleep indefinitely while asynchronous events are handled by the listener. - // - while (!stopping) - qpid::sys::sleep(1); - - sm.delBroker(broker); - return 0; - } - - void stop() - { - stopping = true; - } -}; - -Main main_program; - -void signal_handler(int) -{ - main_program.stop(); -} - -int main(int argc, char** argv) -{ - signal(SIGINT, signal_handler); - try { - return main_program.run(argc, argv); - } catch(std::exception& e) { - cout << "Top Level Exception: " << e.what() << endl; - } -} - diff --git a/cpp/examples/qmf-console/qmf-console_console.vcproj b/cpp/examples/qmf-console/qmf-console_console.vcproj deleted file mode 100644 index eea535b85d..0000000000 --- a/cpp/examples/qmf-console/qmf-console_console.vcproj +++ /dev/null @@ -1,394 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?>
-<!--
- -
- - Licensed to the Apache Software Foundation (ASF) under one
- - or more contributor license agreements. See the NOTICE file
- - distributed with this work for additional information
- - regarding copyright ownership. The ASF licenses this file
- - to you under the Apache License, Version 2.0 (the
- - "License"); you may not use this file except in compliance
- - with the License. You may obtain a copy of the License at
- -
- - http://www.apache.org/licenses/LICENSE-2.0
- -
- - Unless required by applicable law or agreed to in writing,
- - software distributed under the License is distributed on an
- - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- - KIND, either express or implied. See the License for the
- - specific language governing permissions and limitations
- - under the License.
- -
- -->
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="qmf_console_console"
- ProjectGUID="{490473E1-FECA-1BAD-2E13-3FFA2B8669C3}"
- RootNamespace="qmf_console_console"
- Keyword="Win32Proj"
- SignManifests="true"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="."
- IntermediateDirectory="Debug\qmf_console_console\I386"
- ConfigurationType="1"
- CharacterSet="0"
-
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- AdditionalOptions=""
- AdditionalIncludeDirectories=""
- TypeLibraryName="$(InputName).tlb"
- HeaderFileName="$(InputName).h"
- InterfaceIdentifierFileName="$(InputName)_i.c"
- ProxyFileName="$(InputName)_p.c"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="$(BOOST_ROOT)\include\$(BOOST_VERSION),$(BOOST_ROOT)\.,$(QPID_ROOT)\include,..\..\include"
- PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;_CRT_NONSTDC_NO_WARNINGS;NOMINMAX;WIN32_LEAN_AND_MEAN;_SCL_SECURE_NO_WARNINGS;BOOST_ALL_DYN_LINK"
- MinimalRebuild="false"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- DisableSpecificWarnings="4244;4800"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG;NOMINMAX;WIN32_LEAN_AND_MEAN;_SCL_SECURE_NO_WARNINGS"
- Culture="1033"
- AdditionalIncludeDirectories="$(BOOST_ROOT)\include\$(BOOST_VERSION),$(BOOST_ROOT)\.,$(QPID_ROOT)\include,..\..\include"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="qpidcommond.lib qpidclientd.lib qmfconsoled.lib"
- OutputFile="$(OutDir)\console.exe"
- LinkIncremental="2"
- SuppressStartupBanner="true"
- AdditionalLibraryDirectories=".;$(BOOST_ROOT)\lib;$(QPID_ROOT)\bin,..\..\bin"
- GenerateDebugInformation="true"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release\qmf_console_console\I386"
- ConfigurationType="1"
- CharacterSet="0"
-
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- AdditionalOptions=""
- AdditionalIncludeDirectories=""
- TypeLibraryName="$(InputName).tlb"
- HeaderFileName="$(InputName).h"
- InterfaceIdentifierFileName="$(InputName)_i.c"
- ProxyFileName="$(InputName)_p.c"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories="$(BOOST_ROOT)\include\$(BOOST_VERSION),$(BOOST_ROOT)\.,$(QPID_ROOT)\include,..\..\include"
- PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_CRT_NONSTDC_NO_WARNINGS;NOMINMAX;WIN32_LEAN_AND_MEAN;_SCL_SECURE_NO_WARNINGS;BOOST_ALL_DYN_LINK"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DisableSpecificWarnings="4244;4800"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG;NOMINMAX;WIN32_LEAN_AND_MEAN;_SCL_SECURE_NO_WARNINGS"
- Culture="1033"
- AdditionalIncludeDirectories="$(BOOST_ROOT)\include\$(BOOST_VERSION),$(BOOST_ROOT)\.,$(QPID_ROOT)\include,..\..\include"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="qpidcommon.lib qpidclient.lib qmfconsole.lib"
- OutputFile="$(OutDir)\console.exe"
- LinkIncremental="1"
- SuppressStartupBanner="true"
- AdditionalLibraryDirectories=".;$(BOOST_ROOT)\lib;$(QPID_ROOT)\bin,..\..\bin"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="."
- IntermediateDirectory="Debug\qmf_console_console\AMD64"
- ConfigurationType="1"
- CharacterSet="0"
-
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- AdditionalOptions=""
- AdditionalIncludeDirectories=""
- TypeLibraryName="$(InputName).tlb"
- HeaderFileName="$(InputName).h"
- InterfaceIdentifierFileName="$(InputName)_i.c"
- ProxyFileName="$(InputName)_p.c"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="$(BOOST_ROOT)\include\$(BOOST_VERSION),$(BOOST_ROOT)\.,$(QPID_ROOT)\include,..\..\include"
- PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;_CRT_NONSTDC_NO_WARNINGS;_AMD64_;_WIN64;NOMINMAX;WIN32_LEAN_AND_MEAN;_SCL_SECURE_NO_WARNINGS;BOOST_ALL_DYN_LINK"
- MinimalRebuild="false"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- DisableSpecificWarnings="4244;4800"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG;NOMINMAX;WIN32_LEAN_AND_MEAN;_SCL_SECURE_NO_WARNINGS;_WIN64"
- Culture="1033"
- AdditionalIncludeDirectories="$(BOOST_ROOT)\include\$(BOOST_VERSION),$(BOOST_ROOT)\.,$(QPID_ROOT)\include,..\..\include"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalOptions="/machine:AMD64"
- AdditionalDependencies="qpidcommond.lib qpidclientd.lib qmfconsoled.lib"
- OutputFile="$(OutDir)\console.exe"
- LinkIncremental="2"
- SuppressStartupBanner="true"
- AdditionalLibraryDirectories=".;$(BOOST_ROOT)\lib;$(QPID_ROOT)\bin,..\..\bin"
- GenerateDebugInformation="true"
- SubSystem="1"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="Release"
- IntermediateDirectory="Release\qmf_console_console\AMD64"
- ConfigurationType="1"
- CharacterSet="0"
-
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- AdditionalOptions=""
- AdditionalIncludeDirectories=""
- TypeLibraryName="$(InputName).tlb"
- HeaderFileName="$(InputName).h"
- InterfaceIdentifierFileName="$(InputName)_i.c"
- ProxyFileName="$(InputName)_p.c"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories="$(BOOST_ROOT)\include\$(BOOST_VERSION),$(BOOST_ROOT)\.,$(QPID_ROOT)\include,..\..\include"
- PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_CRT_NONSTDC_NO_WARNINGS;_AMD64_;_WIN64;NOMINMAX;WIN32_LEAN_AND_MEAN;_SCL_SECURE_NO_WARNINGS;BOOST_ALL_DYN_LINK"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DisableSpecificWarnings="4244;4800"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG;NOMINMAX;WIN32_LEAN_AND_MEAN;_SCL_SECURE_NO_WARNINGS;_WIN64"
- Culture="1033"
- AdditionalIncludeDirectories="$(BOOST_ROOT)\include\$(BOOST_VERSION),$(BOOST_ROOT)\.,$(QPID_ROOT)\include,..\..\include"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalOptions="/machine:AMD64"
- AdditionalDependencies="qpidcommon.lib qpidclient.lib qmfconsole.lib"
- OutputFile="$(OutDir)\console.exe"
- LinkIncremental="1"
- SuppressStartupBanner="true"
- AdditionalLibraryDirectories=".;$(BOOST_ROOT)\lib;$(QPID_ROOT)\bin,..\..\bin"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;cxx;cc;C;c">
- <File
- RelativePath="console.cpp">
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hh">
- <File
- RelativePath="ConnectionOptions.h">
- </File>
- <File
- RelativePath="TestOptions.h">
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/cpp/examples/qmf-console/qmf-console_ping.vcproj b/cpp/examples/qmf-console/qmf-console_ping.vcproj deleted file mode 100644 index b193f8cf28..0000000000 --- a/cpp/examples/qmf-console/qmf-console_ping.vcproj +++ /dev/null @@ -1,419 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?>
-<!--
- -
- - Licensed to the Apache Software Foundation (ASF) under one
- - or more contributor license agreements. See the NOTICE file
- - distributed with this work for additional information
- - regarding copyright ownership. The ASF licenses this file
- - to you under the Apache License, Version 2.0 (the
- - "License"); you may not use this file except in compliance
- - with the License. You may obtain a copy of the License at
- -
- - http://www.apache.org/licenses/LICENSE-2.0
- -
- - Unless required by applicable law or agreed to in writing,
- - software distributed under the License is distributed on an
- - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- - KIND, either express or implied. See the License for the
- - specific language governing permissions and limitations
- - under the License.
- -
- -->
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="qmf_console_ping"
- ProjectGUID="{C1FFDE95-3442-49AE-9985-7EEE3D45B4A3}"
- RootNamespace="qmf_console_ping"
- Keyword="Win32Proj"
- TargetFrameworkVersion="0"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="."
- IntermediateDirectory="Debug\qmf_console_ping\I386"
- ConfigurationType="1"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- AdditionalOptions=""
- AdditionalIncludeDirectories=""
- TypeLibraryName="$(InputName).tlb"
- HeaderFileName="$(InputName).h"
- InterfaceIdentifierFileName="$(InputName)_i.c"
- ProxyFileName="$(InputName)_p.c"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="$(BOOST_ROOT)\include\$(BOOST_VERSION),$(BOOST_ROOT)\.,$(QPID_ROOT)\include,..\..\include"
- PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;_CRT_NONSTDC_NO_WARNINGS;NOMINMAX;WIN32_LEAN_AND_MEAN;_SCL_SECURE_NO_WARNINGS;BOOST_ALL_DYN_LINK"
- MinimalRebuild="false"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- DisableSpecificWarnings="4244;4800"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG;NOMINMAX;WIN32_LEAN_AND_MEAN;_SCL_SECURE_NO_WARNINGS"
- Culture="1033"
- AdditionalIncludeDirectories="$(BOOST_ROOT)\include\$(BOOST_VERSION),$(BOOST_ROOT)\.,$(QPID_ROOT)\include,..\..\include"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="qpidcommond.lib qpidclientd.lib qmfconsoled.lib"
- OutputFile="$(OutDir)\ping.exe"
- LinkIncremental="2"
- SuppressStartupBanner="true"
- AdditionalLibraryDirectories=".;$(BOOST_ROOT)\lib;$(QPID_ROOT)\bin,..\..\bin"
- GenerateDebugInformation="true"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="."
- IntermediateDirectory="Debug\qmf_console_ping\AMD64"
- ConfigurationType="1"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- AdditionalOptions=""
- AdditionalIncludeDirectories=""
- TypeLibraryName="$(InputName).tlb"
- HeaderFileName="$(InputName).h"
- InterfaceIdentifierFileName="$(InputName)_i.c"
- ProxyFileName="$(InputName)_p.c"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="$(BOOST_ROOT)\include\$(BOOST_VERSION),$(BOOST_ROOT)\.,$(QPID_ROOT)\include,..\..\include"
- PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;_CRT_NONSTDC_NO_WARNINGS;_AMD64_;_WIN64;NOMINMAX;WIN32_LEAN_AND_MEAN;_SCL_SECURE_NO_WARNINGS;BOOST_ALL_DYN_LINK"
- MinimalRebuild="false"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- DisableSpecificWarnings="4244;4800"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG;NOMINMAX;WIN32_LEAN_AND_MEAN;_SCL_SECURE_NO_WARNINGS;_WIN64"
- Culture="1033"
- AdditionalIncludeDirectories="$(BOOST_ROOT)\include\$(BOOST_VERSION),$(BOOST_ROOT)\.,$(QPID_ROOT)\include,..\..\include"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalOptions="/machine:AMD64"
- AdditionalDependencies="qpidcommond.lib qpidclientd.lib qmfconsoled.lib"
- OutputFile="$(OutDir)\ping.exe"
- LinkIncremental="2"
- SuppressStartupBanner="true"
- AdditionalLibraryDirectories=".;$(BOOST_ROOT)\lib;$(QPID_ROOT)\bin,..\..\bin"
- GenerateDebugInformation="true"
- SubSystem="1"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release\qmf_console_ping\I386"
- ConfigurationType="1"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- AdditionalOptions=""
- AdditionalIncludeDirectories=""
- TypeLibraryName="$(InputName).tlb"
- HeaderFileName="$(InputName).h"
- InterfaceIdentifierFileName="$(InputName)_i.c"
- ProxyFileName="$(InputName)_p.c"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories="$(BOOST_ROOT)\include\$(BOOST_VERSION),$(BOOST_ROOT)\.,$(QPID_ROOT)\include,..\..\include"
- PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_CRT_NONSTDC_NO_WARNINGS;NOMINMAX;WIN32_LEAN_AND_MEAN;_SCL_SECURE_NO_WARNINGS;BOOST_ALL_DYN_LINK"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DisableSpecificWarnings="4244;4800"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG;NOMINMAX;WIN32_LEAN_AND_MEAN;_SCL_SECURE_NO_WARNINGS"
- Culture="1033"
- AdditionalIncludeDirectories="$(BOOST_ROOT)\include\$(BOOST_VERSION),$(BOOST_ROOT)\.,$(QPID_ROOT)\include,..\..\include"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="qpidcommon.lib qpidclient.lib qmfconsole.lib"
- OutputFile="$(OutDir)\ping.exe"
- LinkIncremental="1"
- SuppressStartupBanner="true"
- AdditionalLibraryDirectories=".;$(BOOST_ROOT)\lib;$(QPID_ROOT)\bin,..\..\bin"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="Release"
- IntermediateDirectory="Release\qmf_console_ping\AMD64"
- ConfigurationType="1"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- AdditionalOptions=""
- AdditionalIncludeDirectories=""
- TypeLibraryName="$(InputName).tlb"
- HeaderFileName="$(InputName).h"
- InterfaceIdentifierFileName="$(InputName)_i.c"
- ProxyFileName="$(InputName)_p.c"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories="$(BOOST_ROOT)\include\$(BOOST_VERSION),$(BOOST_ROOT)\.,$(QPID_ROOT)\include,..\..\include"
- PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_CRT_NONSTDC_NO_WARNINGS;_AMD64_;_WIN64;NOMINMAX;WIN32_LEAN_AND_MEAN;_SCL_SECURE_NO_WARNINGS;BOOST_ALL_DYN_LINK"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DisableSpecificWarnings="4244;4800"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG;NOMINMAX;WIN32_LEAN_AND_MEAN;_SCL_SECURE_NO_WARNINGS;_WIN64"
- Culture="1033"
- AdditionalIncludeDirectories="$(BOOST_ROOT)\include\$(BOOST_VERSION),$(BOOST_ROOT)\.,$(QPID_ROOT)\include,..\..\include"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalOptions="/machine:AMD64"
- AdditionalDependencies="qpidcommon.lib qpidclient.lib qmfconsole.lib"
- OutputFile="$(OutDir)\ping.exe"
- LinkIncremental="1"
- SuppressStartupBanner="true"
- AdditionalLibraryDirectories=".;$(BOOST_ROOT)\lib;$(QPID_ROOT)\bin,..\..\bin"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;cxx;cc;C;c"
- >
- <File
- RelativePath="ping.cpp"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hh"
- >
- <File
- RelativePath="ConnectionOptions.h"
- >
- </File>
- <File
- RelativePath="TestOptions.h"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/cpp/examples/qmf-console/qmf-console_printevents.vcproj b/cpp/examples/qmf-console/qmf-console_printevents.vcproj deleted file mode 100644 index 221d922212..0000000000 --- a/cpp/examples/qmf-console/qmf-console_printevents.vcproj +++ /dev/null @@ -1,394 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?>
-<!--
- -
- - Licensed to the Apache Software Foundation (ASF) under one
- - or more contributor license agreements. See the NOTICE file
- - distributed with this work for additional information
- - regarding copyright ownership. The ASF licenses this file
- - to you under the Apache License, Version 2.0 (the
- - "License"); you may not use this file except in compliance
- - with the License. You may obtain a copy of the License at
- -
- - http://www.apache.org/licenses/LICENSE-2.0
- -
- - Unless required by applicable law or agreed to in writing,
- - software distributed under the License is distributed on an
- - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- - KIND, either express or implied. See the License for the
- - specific language governing permissions and limitations
- - under the License.
- -
- -->
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="qmf_console_printevents"
- ProjectGUID="{72C74624-FECA-1BAD-2E13-3FFA2B8669C3}"
- RootNamespace="qmf_console_printevents"
- Keyword="Win32Proj"
- SignManifests="true"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="."
- IntermediateDirectory="Debug\qmf_console_printevents\I386"
- ConfigurationType="1"
- CharacterSet="0"
-
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- AdditionalOptions=""
- AdditionalIncludeDirectories=""
- TypeLibraryName="$(InputName).tlb"
- HeaderFileName="$(InputName).h"
- InterfaceIdentifierFileName="$(InputName)_i.c"
- ProxyFileName="$(InputName)_p.c"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="$(BOOST_ROOT)\include\$(BOOST_VERSION),$(BOOST_ROOT)\.,$(QPID_ROOT)\include,..\..\include"
- PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;_CRT_NONSTDC_NO_WARNINGS;NOMINMAX;WIN32_LEAN_AND_MEAN;_SCL_SECURE_NO_WARNINGS;BOOST_ALL_DYN_LINK"
- MinimalRebuild="false"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- DisableSpecificWarnings="4244;4800"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG;NOMINMAX;WIN32_LEAN_AND_MEAN;_SCL_SECURE_NO_WARNINGS"
- Culture="1033"
- AdditionalIncludeDirectories="$(BOOST_ROOT)\include\$(BOOST_VERSION),$(BOOST_ROOT)\.,$(QPID_ROOT)\include,..\..\include"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="qpidcommond.lib qpidclientd.lib qmfconsoled.lib"
- OutputFile="$(OutDir)\printevents.exe"
- LinkIncremental="2"
- SuppressStartupBanner="true"
- AdditionalLibraryDirectories=".;$(BOOST_ROOT)\lib;$(QPID_ROOT)\bin,..\..\bin"
- GenerateDebugInformation="true"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release\qmf_console_printevents\I386"
- ConfigurationType="1"
- CharacterSet="0"
-
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- AdditionalOptions=""
- AdditionalIncludeDirectories=""
- TypeLibraryName="$(InputName).tlb"
- HeaderFileName="$(InputName).h"
- InterfaceIdentifierFileName="$(InputName)_i.c"
- ProxyFileName="$(InputName)_p.c"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories="$(BOOST_ROOT)\include\$(BOOST_VERSION),$(BOOST_ROOT)\.,$(QPID_ROOT)\include,..\..\include"
- PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_CRT_NONSTDC_NO_WARNINGS;NOMINMAX;WIN32_LEAN_AND_MEAN;_SCL_SECURE_NO_WARNINGS;BOOST_ALL_DYN_LINK"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DisableSpecificWarnings="4244;4800"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG;NOMINMAX;WIN32_LEAN_AND_MEAN;_SCL_SECURE_NO_WARNINGS"
- Culture="1033"
- AdditionalIncludeDirectories="$(BOOST_ROOT)\include\$(BOOST_VERSION),$(BOOST_ROOT)\.,$(QPID_ROOT)\include,..\..\include"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="qpidcommon.lib qpidclient.lib qmfconsole.lib"
- OutputFile="$(OutDir)\printevents.exe"
- LinkIncremental="1"
- SuppressStartupBanner="true"
- AdditionalLibraryDirectories=".;$(BOOST_ROOT)\lib;$(QPID_ROOT)\bin,..\..\bin"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="."
- IntermediateDirectory="Debug\qmf_console_printevents\AMD64"
- ConfigurationType="1"
- CharacterSet="0"
-
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- AdditionalOptions=""
- AdditionalIncludeDirectories=""
- TypeLibraryName="$(InputName).tlb"
- HeaderFileName="$(InputName).h"
- InterfaceIdentifierFileName="$(InputName)_i.c"
- ProxyFileName="$(InputName)_p.c"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="$(BOOST_ROOT)\include\$(BOOST_VERSION),$(BOOST_ROOT)\.,$(QPID_ROOT)\include,..\..\include"
- PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;_CRT_NONSTDC_NO_WARNINGS;_AMD64_;_WIN64;NOMINMAX;WIN32_LEAN_AND_MEAN;_SCL_SECURE_NO_WARNINGS;BOOST_ALL_DYN_LINK"
- MinimalRebuild="false"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- DisableSpecificWarnings="4244;4800"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG;NOMINMAX;WIN32_LEAN_AND_MEAN;_SCL_SECURE_NO_WARNINGS;_WIN64"
- Culture="1033"
- AdditionalIncludeDirectories="$(BOOST_ROOT)\include\$(BOOST_VERSION),$(BOOST_ROOT)\.,$(QPID_ROOT)\include,..\..\include"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalOptions="/machine:AMD64"
- AdditionalDependencies="qpidcommond.lib qpidclientd.lib qmfconsoled.lib"
- OutputFile="$(OutDir)\printevents.exe"
- LinkIncremental="2"
- SuppressStartupBanner="true"
- AdditionalLibraryDirectories=".;$(BOOST_ROOT)\lib;$(QPID_ROOT)\bin,..\..\bin"
- GenerateDebugInformation="true"
- SubSystem="1"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="Release"
- IntermediateDirectory="Release\qmf_console_printevents\AMD64"
- ConfigurationType="1"
- CharacterSet="0"
-
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- AdditionalOptions=""
- AdditionalIncludeDirectories=""
- TypeLibraryName="$(InputName).tlb"
- HeaderFileName="$(InputName).h"
- InterfaceIdentifierFileName="$(InputName)_i.c"
- ProxyFileName="$(InputName)_p.c"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories="$(BOOST_ROOT)\include\$(BOOST_VERSION),$(BOOST_ROOT)\.,$(QPID_ROOT)\include,..\..\include"
- PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_CRT_NONSTDC_NO_WARNINGS;_AMD64_;_WIN64;NOMINMAX;WIN32_LEAN_AND_MEAN;_SCL_SECURE_NO_WARNINGS;BOOST_ALL_DYN_LINK"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DisableSpecificWarnings="4244;4800"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG;NOMINMAX;WIN32_LEAN_AND_MEAN;_SCL_SECURE_NO_WARNINGS;_WIN64"
- Culture="1033"
- AdditionalIncludeDirectories="$(BOOST_ROOT)\include\$(BOOST_VERSION),$(BOOST_ROOT)\.,$(QPID_ROOT)\include,..\..\include"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalOptions="/machine:AMD64"
- AdditionalDependencies="qpidcommon.lib qpidclient.lib qmfconsole.lib"
- OutputFile="$(OutDir)\printevents.exe"
- LinkIncremental="1"
- SuppressStartupBanner="true"
- AdditionalLibraryDirectories=".;$(BOOST_ROOT)\lib;$(QPID_ROOT)\bin,..\..\bin"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;cxx;cc;C;c">
- <File
- RelativePath="printevents.cpp">
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hh">
- <File
- RelativePath="ConnectionOptions.h">
- </File>
- <File
- RelativePath="TestOptions.h">
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/cpp/examples/qmf-console/qmf-console_queuestats.vcproj b/cpp/examples/qmf-console/qmf-console_queuestats.vcproj deleted file mode 100644 index d89650b335..0000000000 --- a/cpp/examples/qmf-console/qmf-console_queuestats.vcproj +++ /dev/null @@ -1,394 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?>
-<!--
- -
- - Licensed to the Apache Software Foundation (ASF) under one
- - or more contributor license agreements. See the NOTICE file
- - distributed with this work for additional information
- - regarding copyright ownership. The ASF licenses this file
- - to you under the Apache License, Version 2.0 (the
- - "License"); you may not use this file except in compliance
- - with the License. You may obtain a copy of the License at
- -
- - http://www.apache.org/licenses/LICENSE-2.0
- -
- - Unless required by applicable law or agreed to in writing,
- - software distributed under the License is distributed on an
- - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- - KIND, either express or implied. See the License for the
- - specific language governing permissions and limitations
- - under the License.
- -
- -->
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="qmf_console_queuestats"
- ProjectGUID="{B21825EA-FECA-1BAD-2E13-3FFA2B8669C3}"
- RootNamespace="qmf_console_queuestats"
- Keyword="Win32Proj"
- SignManifests="true"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="."
- IntermediateDirectory="Debug\qmf_console_queuestats\I386"
- ConfigurationType="1"
- CharacterSet="0"
-
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- AdditionalOptions=""
- AdditionalIncludeDirectories=""
- TypeLibraryName="$(InputName).tlb"
- HeaderFileName="$(InputName).h"
- InterfaceIdentifierFileName="$(InputName)_i.c"
- ProxyFileName="$(InputName)_p.c"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="$(BOOST_ROOT)\include\$(BOOST_VERSION),$(BOOST_ROOT)\.,$(QPID_ROOT)\include,..\..\include"
- PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;_CRT_NONSTDC_NO_WARNINGS;NOMINMAX;WIN32_LEAN_AND_MEAN;_SCL_SECURE_NO_WARNINGS;BOOST_ALL_DYN_LINK"
- MinimalRebuild="false"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- DisableSpecificWarnings="4244;4800"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG;NOMINMAX;WIN32_LEAN_AND_MEAN;_SCL_SECURE_NO_WARNINGS"
- Culture="1033"
- AdditionalIncludeDirectories="$(BOOST_ROOT)\include\$(BOOST_VERSION),$(BOOST_ROOT)\.,$(QPID_ROOT)\include,..\..\include"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="qpidcommond.lib qpidclientd.lib qmfconsoled.lib"
- OutputFile="$(OutDir)\queuestats.exe"
- LinkIncremental="2"
- SuppressStartupBanner="true"
- AdditionalLibraryDirectories=".;$(BOOST_ROOT)\lib;$(QPID_ROOT)\bin,..\..\bin"
- GenerateDebugInformation="true"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release\qmf_console_queuestats\I386"
- ConfigurationType="1"
- CharacterSet="0"
-
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- AdditionalOptions=""
- AdditionalIncludeDirectories=""
- TypeLibraryName="$(InputName).tlb"
- HeaderFileName="$(InputName).h"
- InterfaceIdentifierFileName="$(InputName)_i.c"
- ProxyFileName="$(InputName)_p.c"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories="$(BOOST_ROOT)\include\$(BOOST_VERSION),$(BOOST_ROOT)\.,$(QPID_ROOT)\include,..\..\include"
- PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_CRT_NONSTDC_NO_WARNINGS;NOMINMAX;WIN32_LEAN_AND_MEAN;_SCL_SECURE_NO_WARNINGS;BOOST_ALL_DYN_LINK"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DisableSpecificWarnings="4244;4800"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG;NOMINMAX;WIN32_LEAN_AND_MEAN;_SCL_SECURE_NO_WARNINGS"
- Culture="1033"
- AdditionalIncludeDirectories="$(BOOST_ROOT)\include\$(BOOST_VERSION),$(BOOST_ROOT)\.,$(QPID_ROOT)\include,..\..\include"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="qpidcommon.lib qpidclient.lib qmfconsole.lib"
- OutputFile="$(OutDir)\queuestats.exe"
- LinkIncremental="1"
- SuppressStartupBanner="true"
- AdditionalLibraryDirectories=".;$(BOOST_ROOT)\lib;$(QPID_ROOT)\bin,..\..\bin"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="."
- IntermediateDirectory="Debug\qmf_console_queuestats\AMD64"
- ConfigurationType="1"
- CharacterSet="0"
-
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- AdditionalOptions=""
- AdditionalIncludeDirectories=""
- TypeLibraryName="$(InputName).tlb"
- HeaderFileName="$(InputName).h"
- InterfaceIdentifierFileName="$(InputName)_i.c"
- ProxyFileName="$(InputName)_p.c"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="$(BOOST_ROOT)\include\$(BOOST_VERSION),$(BOOST_ROOT)\.,$(QPID_ROOT)\include,..\..\include"
- PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;_CRT_NONSTDC_NO_WARNINGS;_AMD64_;_WIN64;NOMINMAX;WIN32_LEAN_AND_MEAN;_SCL_SECURE_NO_WARNINGS;BOOST_ALL_DYN_LINK"
- MinimalRebuild="false"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- RuntimeTypeInfo="true"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- DisableSpecificWarnings="4244;4800"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG;NOMINMAX;WIN32_LEAN_AND_MEAN;_SCL_SECURE_NO_WARNINGS;_WIN64"
- Culture="1033"
- AdditionalIncludeDirectories="$(BOOST_ROOT)\include\$(BOOST_VERSION),$(BOOST_ROOT)\.,$(QPID_ROOT)\include,..\..\include"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalOptions="/machine:AMD64"
- AdditionalDependencies="qpidcommond.lib qpidclientd.lib qmfconsoled.lib"
- OutputFile="$(OutDir)\queuestats.exe"
- LinkIncremental="2"
- SuppressStartupBanner="true"
- AdditionalLibraryDirectories=".;$(BOOST_ROOT)\lib;$(QPID_ROOT)\bin,..\..\bin"
- GenerateDebugInformation="true"
- SubSystem="1"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="Release"
- IntermediateDirectory="Release\qmf_console_queuestats\AMD64"
- ConfigurationType="1"
- CharacterSet="0"
-
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- AdditionalOptions=""
- AdditionalIncludeDirectories=""
- TypeLibraryName="$(InputName).tlb"
- HeaderFileName="$(InputName).h"
- InterfaceIdentifierFileName="$(InputName)_i.c"
- ProxyFileName="$(InputName)_p.c"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories="$(BOOST_ROOT)\include\$(BOOST_VERSION),$(BOOST_ROOT)\.,$(QPID_ROOT)\include,..\..\include"
- PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;_CRT_NONSTDC_NO_WARNINGS;_AMD64_;_WIN64;NOMINMAX;WIN32_LEAN_AND_MEAN;_SCL_SECURE_NO_WARNINGS;BOOST_ALL_DYN_LINK"
- RuntimeLibrary="2"
- RuntimeTypeInfo="true"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DisableSpecificWarnings="4244;4800"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG;NOMINMAX;WIN32_LEAN_AND_MEAN;_SCL_SECURE_NO_WARNINGS;_WIN64"
- Culture="1033"
- AdditionalIncludeDirectories="$(BOOST_ROOT)\include\$(BOOST_VERSION),$(BOOST_ROOT)\.,$(QPID_ROOT)\include,..\..\include"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalOptions="/machine:AMD64"
- AdditionalDependencies="qpidcommon.lib qpidclient.lib qmfconsole.lib"
- OutputFile="$(OutDir)\queuestats.exe"
- LinkIncremental="1"
- SuppressStartupBanner="true"
- AdditionalLibraryDirectories=".;$(BOOST_ROOT)\lib;$(QPID_ROOT)\bin,..\..\bin"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;cxx;cc;C;c">
- <File
- RelativePath="queuestats.cpp">
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hh">
- <File
- RelativePath="ConnectionOptions.h">
- </File>
- <File
- RelativePath="TestOptions.h">
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/cpp/examples/qmf-console/queuestats.cpp b/cpp/examples/qmf-console/queuestats.cpp deleted file mode 100644 index 2c38777ad8..0000000000 --- a/cpp/examples/qmf-console/queuestats.cpp +++ /dev/null @@ -1,142 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ - -#include "qpid/console/ConsoleListener.h" -#include "qpid/console/SessionManager.h" -#include "qpid/sys/Time.h" - -using namespace std; -using namespace qpid::console; - -// -// Declare a subclass of ConsoleListener to receive asynchronous data. -// -class Listener : public ConsoleListener { - - // - // Declare a map from ObjectId to string to store queue names by their object IDs. - // - typedef map<ObjectId, string> QueueMap; - QueueMap queueMap; -public: - ~Listener() {} - - // - // Receive property updates from the agent. - // - void objectProps(Broker& /*broker*/, Object& object) { - string name = object.attrString("name"); - ObjectId oid = object.getObjectId(); - QueueMap::iterator iter = queueMap.find(oid); - - if (iter == queueMap.end()) { - // - // Object is not in the map. Learn it. - // - cout << "New Queue: " << name << endl; - queueMap[oid] = name; - } - } - - // - // Receive statistic updates from the agent. - // - void objectStats(Broker& /*broker*/, Object& object) { - ObjectId oid = object.getObjectId(); - QueueMap::iterator iter = queueMap.find(oid); - if (iter == queueMap.end()) - // - // Object id is not in the map. We are not interested in this update. - // - return; - - cout << "Stats for: " << iter->second << endl; - cout << " msgTotalEnqueues = " << object.attrUint64("msgTotalEnqueues") << endl; - cout << " msgTotalDequeues = " << object.attrUint64("msgTotalDequeues") << endl; - cout << " msgDepth = " << object.attrUint("msgDepth") << endl; - - if (object.isDeleted()) { - // - // Object was deleted and is in the map. Remove it. - // - cout << "Queue Deleted: " << iter->second << endl; - queueMap.erase(oid); - } - - // - // Note that the object-delete logic is done after processing statistics. - // This allows us to get the "final" statistics for a deleted object. It also - // assures that very short-lived objects are accounted for (i.e. created, used, - // and destroyed all within a single reporting interval). - // - } -}; - -//============================================================== -// Main program -//============================================================== -int main_int(int /*argc*/, char** /*argv*/) -{ - Listener listener; - - // - // Tune the settings for this application: We wish to receive objects but not events. - // By using "userBindings", we can restrict which objects we receive updates for. - // - SessionManager::Settings sessionSettings; - sessionSettings.rcvObjects = true; - sessionSettings.rcvEvents = false; - sessionSettings.rcvHeartbeats = false; - sessionSettings.userBindings = true; - - SessionManager sm(&listener, sessionSettings); - - // - // We want to receive updates only for the broker queue object. - // - sm.bindClass("org.apache.qpid.broker", "queue"); - - // - // Connect to the broker. - // - qpid::client::ConnectionSettings connSettings; - Broker* broker = sm.addBroker(connSettings); - - // - // Sleep while the listener does all the work asynchronously. - // - for (;;) { - qpid::sys::sleep(1); - } - - sm.delBroker(broker); - return 0; -} - -int main(int argc, char** argv) -{ - try { - return main_int(argc, argv); - } catch(std::exception& e) { - cout << "Top Level Exception: " << e.what() << endl; - } -} - diff --git a/cpp/include/qpid/console/Agent.h b/cpp/include/qpid/console/Agent.h deleted file mode 100644 index 629dd71dee..0000000000 --- a/cpp/include/qpid/console/Agent.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -#ifndef _QPID_CONSOLE_AGENT_H_ -#define _QPID_CONSOLE_AGENT_H_ - -#include "qpid/console/Broker.h" -#include "qpid/console/ConsoleImportExport.h" - -namespace qpid { -namespace console { - - /** - * - * \ingroup qmfconsoleapi - */ - class QPID_CONSOLE_CLASS_EXTERN Agent { - public: - typedef std::vector<Agent*> Vector; - - QPID_CONSOLE_INLINE_EXTERN Agent(Broker* _broker, uint32_t _bank, const std::string& _label) : - broker(_broker), brokerBank(broker->getBrokerBank()), - agentBank(_bank), label(_label) {} - QPID_CONSOLE_INLINE_EXTERN Broker* getBroker() const { return broker; } - QPID_CONSOLE_INLINE_EXTERN uint32_t getBrokerBank() const { return brokerBank; } - QPID_CONSOLE_INLINE_EXTERN uint32_t getAgentBank() const { return agentBank; } - QPID_CONSOLE_INLINE_EXTERN const std::string& getLabel() const { return label; } - - private: - Broker* broker; - const uint32_t brokerBank; - const uint32_t agentBank; - const std::string label; - }; - - std::ostream& operator<<(std::ostream& o, const Agent& agent); -} -} - - -#endif diff --git a/cpp/include/qpid/console/Broker.h b/cpp/include/qpid/console/Broker.h deleted file mode 100644 index c2ba8ac81f..0000000000 --- a/cpp/include/qpid/console/Broker.h +++ /dev/null @@ -1,133 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -#ifndef _QPID_CONSOLE_BROKER_H_ -#define _QPID_CONSOLE_BROKER_H_ - -#include "qpid/console/ConsoleImportExport.h" -#include "qpid/client/Connection.h" -#include "qpid/client/ConnectionSettings.h" -#include "qpid/client/SubscriptionManager.h" -#include "qpid/client/Session.h" -#include "qpid/client/AsyncSession.h" -#include "qpid/client/Message.h" -#include "qpid/client/MessageListener.h" -#include "qpid/sys/Thread.h" -#include "qpid/sys/Runnable.h" -#include "qpid/sys/Mutex.h" -#include "qpid/sys/Condition.h" -#include "qpid/Url.h" -#include "qpid/framing/Buffer.h" -#include "qpid/framing/Uuid.h" -#include <string> -#include <iostream> - -namespace qpid { -namespace console { - class SessionManager; - class Agent; - class Object; - - /** - * - * \ingroup qpidconsoleapi - */ - class Broker : public client::MessageListener { - public: - QPID_CONSOLE_EXTERN Broker(SessionManager& sm, - client::ConnectionSettings& settings); - QPID_CONSOLE_EXTERN ~Broker(); - - QPID_CONSOLE_INLINE_EXTERN bool isConnected() const { return connected; } - QPID_CONSOLE_INLINE_EXTERN const std::string& getError() const { return error; } - QPID_CONSOLE_INLINE_EXTERN const std::string& getSessionId() const { return amqpSessionId; } - QPID_CONSOLE_INLINE_EXTERN const framing::Uuid& getBrokerId() const { return brokerId; } - QPID_CONSOLE_INLINE_EXTERN uint32_t getBrokerBank() const { return 1; } - QPID_CONSOLE_INLINE_EXTERN void addBinding(const std::string& key) { - connThreadBody.bindExchange("qpid.management", key); - } - QPID_CONSOLE_EXTERN std::string getUrl() const; - QPID_CONSOLE_EXTERN void waitForStable(); - - private: - friend class SessionManager; - friend class Object; - typedef std::map<uint64_t,Agent*> AgentMap; - static const int SYNC_TIME = 60; - - SessionManager& sessionManager; - AgentMap agents; - bool connected; - std::string error; - std::string amqpSessionId; - client::ConnectionSettings connectionSettings; - sys::Mutex lock; - sys::Condition cond; - framing::Uuid brokerId; - uint32_t reqsOutstanding; - bool syncInFlight; - bool topicBound; - Object* methodObject; - - friend class ConnectionThread; - class ConnectionThread : public sys::Runnable { - bool operational; - bool shuttingDown; - Broker& broker; - framing::Uuid sessionId; - client::Connection connection; - client::Session session; - client::SubscriptionManager* subscriptions; - std::stringstream queueName; - sys::Mutex connLock; - void run(); - public: - ConnectionThread(Broker& _broker) : - operational(false), shuttingDown(false), broker(_broker), subscriptions(0) {} - ~ConnectionThread(); - void sendBuffer(qpid::framing::Buffer& buf, - uint32_t length, - const std::string& exchange = "qpid.management", - const std::string& routingKey = "broker"); - void bindExchange(const std::string& exchange, const std::string& key); - void shutdown(); - }; - - ConnectionThread connThreadBody; - sys::Thread connThread; - - void encodeHeader(framing::Buffer& buf, uint8_t opcode, uint32_t seq = 0) const; - bool checkHeader(framing::Buffer& buf, uint8_t *opcode, uint32_t *seq) const; - void received(client::Message& msg); - void resetAgents(); - void updateAgent(const Object& object); - void incOutstanding(); - void decOutstanding(); - void setBrokerId(const framing::Uuid& id) { brokerId = id; } - void appendAgents(std::vector<Agent*>& agents) const; - - friend std::ostream& operator<<(std::ostream& o, const Broker& k); - }; - - std::ostream& operator<<(std::ostream& o, const Broker& k); -} -} - -#endif diff --git a/cpp/include/qpid/console/ClassKey.h b/cpp/include/qpid/console/ClassKey.h deleted file mode 100644 index 5f7c50351a..0000000000 --- a/cpp/include/qpid/console/ClassKey.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -#ifndef _QPID_CONSOLE_CLASSKEY_H_ -#define _QPID_CONSOLE_CLASSKEY_H_ - -#include <string> -#include "qpid/console/ConsoleImportExport.h" -#include "qpid/console/Package.h" -#include "qpid/framing/Buffer.h" - -namespace qpid { -namespace console { - - /** - * - * \ingroup qmfconsoleapi - */ - class QPID_CONSOLE_CLASS_EXTERN ClassKey { - public: - QPID_CONSOLE_EXTERN static const int HASH_SIZE = 16; - - QPID_CONSOLE_EXTERN ClassKey(const std::string& package, const std::string& name, const uint8_t* hash); - - const QPID_CONSOLE_EXTERN std::string& getPackageName() const { return package; } - const QPID_CONSOLE_EXTERN std::string& getClassName() const { return name; } - const QPID_CONSOLE_EXTERN uint8_t* getHash() const { return hash; } - QPID_CONSOLE_EXTERN std::string getHashString() const; - QPID_CONSOLE_EXTERN std::string str() const; - QPID_CONSOLE_EXTERN bool operator==(const ClassKey& other) const; - QPID_CONSOLE_EXTERN bool operator!=(const ClassKey& other) const; - QPID_CONSOLE_EXTERN bool operator<(const ClassKey& other) const; - QPID_CONSOLE_EXTERN bool operator>(const ClassKey& other) const; - QPID_CONSOLE_EXTERN bool operator<=(const ClassKey& other) const; - QPID_CONSOLE_EXTERN bool operator>=(const ClassKey& other) const; - QPID_CONSOLE_EXTERN void encode(framing::Buffer& buffer) const; - - private: - std::string package; - std::string name; - uint8_t hash[HASH_SIZE]; - }; - - QPID_CONSOLE_EXTERN std::ostream& operator<<(std::ostream& o, const ClassKey& k); -} -} - - -#endif diff --git a/cpp/include/qpid/console/ConsoleImportExport.h b/cpp/include/qpid/console/ConsoleImportExport.h deleted file mode 100644 index aac30858f7..0000000000 --- a/cpp/include/qpid/console/ConsoleImportExport.h +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef QPID_CONSOLE_IMPORT_EXPORT_H -#define QPID_CONSOLE_IMPORT_EXPORT_H - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#include "qpid/ImportExport.h" - -#if defined(CONSOLE_EXPORT) || defined (qmfconsole_EXPORTS) -# define QPID_CONSOLE_EXTERN QPID_EXPORT -# define QPID_CONSOLE_CLASS_EXTERN QPID_CLASS_EXPORT -# define QPID_CONSOLE_INLINE_EXTERN QPID_INLINE_EXPORT -#else -# define QPID_CONSOLE_EXTERN QPID_IMPORT -# define QPID_CONSOLE_CLASS_EXTERN QPID_CLASS_IMPORT -# define QPID_CONSOLE_INLINE_EXTERN QPID_INLINE_IMPORT -#endif - -#endif diff --git a/cpp/include/qpid/console/ConsoleListener.h b/cpp/include/qpid/console/ConsoleListener.h deleted file mode 100644 index 7a649da657..0000000000 --- a/cpp/include/qpid/console/ConsoleListener.h +++ /dev/null @@ -1,97 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -#ifndef _QPID_CONSOLE_CONSOLE_LISTENER_H_ -#define _QPID_CONSOLE_CONSOLE_LISTENER_H_ - -#include <string> -#include "qpid/console/ConsoleImportExport.h" -#include "qpid/console/Broker.h" -#include "qpid/console/ClassKey.h" -#include "qpid/console/Object.h" -#include "qpid/console/Event.h" - -namespace qpid { -namespace console { - - /** - * Implement a subclass of ConsoleListener and subscribe it using - * the SessionManager to receive indications. - * - * \ingroup qmfconsoleapi - */ - class QPID_CONSOLE_EXTERN ConsoleListener{ - public: - virtual ~ConsoleListener() {}; - - /** Invoked when a connection is established to a broker - */ - virtual void brokerConnected(const Broker&) {} - - /** Invoked when the connection to a broker is lost - */ - virtual void brokerDisconnected(const Broker&) {} - - /** Invoked when a QMF package is discovered. - */ - virtual void newPackage(const std::string&) {} - - /** Invoked when a new class is discovered. Session.getSchema can be - * used to obtain details about the class. - */ - virtual void newClass(const ClassKey&) {} - - /** Invoked when a QMF agent is discovered. - */ - virtual void newAgent(const Agent&) {} - - /** Invoked when a QMF agent disconects. - */ - virtual void delAgent(const Agent&) {} - - /** Invoked when an object is updated. - */ - virtual void objectProps(Broker&, Object&) {} - - /** Invoked when an object is updated. - */ - virtual void objectStats(Broker&, Object&) {} - - /** Invoked when an event is raised. - */ - virtual void event(Event&) {} - - /** - */ - //virtual void heartbeat(Agent&, uint64_t) {} - - /** - */ - virtual void brokerInfo(Broker&) {} - - /** - */ - //virtual void methodResponse(Broker&, uint32_t seq, MethodResponse&) {} - }; -} -} - - -#endif diff --git a/cpp/include/qpid/console/Event.h b/cpp/include/qpid/console/Event.h deleted file mode 100644 index ef4ecc791c..0000000000 --- a/cpp/include/qpid/console/Event.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -#ifndef _QPID_CONSOLE_EVENT_H_ -#define _QPID_CONSOLE_EVENT_H_ - -#include "qpid/console/ConsoleImportExport.h" -#include "qpid/console/Object.h" -#include "qpid/framing/Uuid.h" -#include "qpid/framing/FieldTable.h" - -namespace qpid { -namespace framing { - class Buffer; -} -namespace console { - - class Broker; - struct SchemaClass; - class ClassKey; - - /** - * - * \ingroup qmfconsoleapi - */ - class Event { - public: - typedef enum { - SEV_EMERGENCY = 0, SEV_ALERT = 1, SEV_CRITICAL = 2, SEV_ERROR = 3, - SEV_WARNING = 4, SEV_NOTICE = 5, SEV_INFO = 6, SEV_DEBUG = 7 - } Severity; - - QPID_CONSOLE_EXTERN Event(Broker* broker, - SchemaClass* schemaClass, - framing::Buffer& buffer); - Broker* getBroker() const { return broker; } - QPID_CONSOLE_EXTERN const ClassKey& getClassKey() const; - SchemaClass* getSchema() const { return schema; } - const Object::AttributeMap& getAttributes() const { return attributes; } - uint64_t getTimestamp() const { return timestamp; } - uint8_t getSeverity() const { return severity; } - QPID_CONSOLE_EXTERN std::string getSeverityString() const; - - QPID_CONSOLE_EXTERN ObjectId attrRef(const std::string& key) const; - QPID_CONSOLE_EXTERN uint32_t attrUint(const std::string& key) const; - QPID_CONSOLE_EXTERN int32_t attrInt(const std::string& key) const; - QPID_CONSOLE_EXTERN uint64_t attrUint64(const std::string& key) const; - QPID_CONSOLE_EXTERN int64_t attrInt64(const std::string& key) const; - QPID_CONSOLE_EXTERN std::string attrString(const std::string& key) const; - QPID_CONSOLE_EXTERN bool attrBool(const std::string& key) const; - QPID_CONSOLE_EXTERN float attrFloat(const std::string& key) const; - QPID_CONSOLE_EXTERN double attrDouble(const std::string& key) const; - QPID_CONSOLE_EXTERN framing::Uuid attrUuid(const std::string& key) const; - QPID_CONSOLE_EXTERN framing::FieldTable attrMap(const std::string& key) const; - - private: - Broker* broker; - SchemaClass* schema; - uint64_t timestamp; - Severity severity; - Object::AttributeMap attributes; - }; - - QPID_CONSOLE_EXTERN std::ostream& operator<<(std::ostream& o, const Event& event); -} -} - - -#endif diff --git a/cpp/include/qpid/console/Object.h b/cpp/include/qpid/console/Object.h deleted file mode 100644 index 5a29fdf792..0000000000 --- a/cpp/include/qpid/console/Object.h +++ /dev/null @@ -1,123 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -#ifndef _QPID_CONSOLE_OBJECT_H_ -#define _QPID_CONSOLE_OBJECT_H_ - -#include "qpid/console/ConsoleImportExport.h" -#include "qpid/console/ObjectId.h" -#include "qpid/framing/Uuid.h" -#include "qpid/framing/FieldTable.h" -#include <boost/shared_ptr.hpp> -#include <map> -#include <set> -#include <vector> - -namespace qpid { -namespace framing { - class Buffer; -} -namespace console { - - class Broker; - struct SchemaClass; - struct SchemaMethod; - class ObjectId; - class ClassKey; - class Value; - - /** - * \ingroup qmfconsoleapi - */ - struct MethodResponse { - uint32_t code; - std::string text; - std::map<std::string, boost::shared_ptr<Value> > arguments; - }; - - class Object { - public: - typedef std::vector<Object> Vector; - struct AttributeMap : public std::map<std::string, boost::shared_ptr<Value> > { - QPID_CONSOLE_EXTERN void addRef(const std::string& key, const ObjectId& val); - QPID_CONSOLE_EXTERN void addUint(const std::string& key, uint32_t val); - QPID_CONSOLE_EXTERN void addInt(const std::string& key, int32_t val); - QPID_CONSOLE_EXTERN void addUint64(const std::string& key, uint64_t val); - QPID_CONSOLE_EXTERN void addInt64(const std::string& key, int64_t val); - QPID_CONSOLE_EXTERN void addString(const std::string& key, const std::string& val); - QPID_CONSOLE_EXTERN void addBool(const std::string& key, bool val); - QPID_CONSOLE_EXTERN void addFloat(const std::string& key, float val); - QPID_CONSOLE_EXTERN void addDouble(const std::string& key, double val); - QPID_CONSOLE_EXTERN void addUuid(const std::string& key, const framing::Uuid& val); - QPID_CONSOLE_EXTERN void addMap(const std::string& key, const framing::FieldTable& val); - }; - - QPID_CONSOLE_EXTERN Object(Broker* broker, SchemaClass* schemaClass, framing::Buffer& buffer, bool prop, bool stat); - QPID_CONSOLE_EXTERN ~Object(); - - Broker* getBroker() const { return broker; } - const ObjectId& getObjectId() const { return objectId; } - QPID_CONSOLE_EXTERN const ClassKey& getClassKey() const; - SchemaClass* getSchema() const { return schema; } - uint64_t getCurrentTime() const { return currentTime; } - uint64_t getCreateTime() const { return createTime; } - uint64_t getDeleteTime() const { return deleteTime; } - bool isDeleted() const { return deleteTime != 0; } - QPID_CONSOLE_EXTERN std::string getIndex() const; - QPID_CONSOLE_EXTERN void mergeUpdate(const Object& updated); - const AttributeMap& getAttributes() const { return attributes; } - QPID_CONSOLE_EXTERN void invokeMethod(const std::string name, - const AttributeMap& args, - MethodResponse& result); - QPID_CONSOLE_EXTERN void handleMethodResp(framing::Buffer& buffer, - uint32_t sequence); - - QPID_CONSOLE_EXTERN ObjectId attrRef(const std::string& key) const; - QPID_CONSOLE_EXTERN uint32_t attrUint(const std::string& key) const; - QPID_CONSOLE_EXTERN int32_t attrInt(const std::string& key) const; - QPID_CONSOLE_EXTERN uint64_t attrUint64(const std::string& key) const; - QPID_CONSOLE_EXTERN int64_t attrInt64(const std::string& key) const; - QPID_CONSOLE_EXTERN std::string attrString(const std::string& key) const; - QPID_CONSOLE_EXTERN bool attrBool(const std::string& key) const; - QPID_CONSOLE_EXTERN float attrFloat(const std::string& key) const; - QPID_CONSOLE_EXTERN double attrDouble(const std::string& key) const; - QPID_CONSOLE_EXTERN framing::Uuid attrUuid(const std::string& key) const; - QPID_CONSOLE_EXTERN framing::FieldTable attrMap(const std::string& key) const; - - private: - Broker* broker; - SchemaClass* schema; - ObjectId objectId; - uint64_t currentTime; - uint64_t createTime; - uint64_t deleteTime; - AttributeMap attributes; - SchemaMethod* pendingMethod; - MethodResponse methodResponse; - - void parsePresenceMasks(framing::Buffer& buffer, std::set<std::string>& excludeList); - }; - - QPID_CONSOLE_EXTERN std::ostream& operator<<(std::ostream& o, const Object& object); -} -} - - -#endif diff --git a/cpp/include/qpid/console/ObjectId.h b/cpp/include/qpid/console/ObjectId.h deleted file mode 100644 index 0722eaebeb..0000000000 --- a/cpp/include/qpid/console/ObjectId.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -#ifndef _QPID_CONSOLE_OBJECTID_H -#define _QPID_CONSOLE_OBJECTID_H - -#include <iostream> -#include "qpid/console/ConsoleImportExport.h" -#include "qpid/sys/IntegerTypes.h" - -namespace qpid { -namespace framing { - class Buffer; -} -namespace console { - - /** - * - * \ingroup qmfconsoleapi - */ - class QPID_CONSOLE_EXTERN ObjectId { - public: - ObjectId() : first(0), second(0) {} - ObjectId(framing::Buffer& buffer); - - uint8_t getFlags() const { return (uint8_t)((first & 0xF000000000000000LL) >> 60); } - uint16_t getSequence() const { return (uint16_t)((first & 0x0FFF000000000000LL) >> 48); } - uint32_t getBrokerBank() const { return (uint32_t)((first & 0x0000FFFFF0000000LL) >> 28); } - uint32_t getAgentBank() const { return (uint32_t) (first & 0x000000000FFFFFFFLL); } - uint64_t getObject() const { return second; } - bool isDurable() const { return getSequence() == 0; } - void decode(framing::Buffer& buffer); - void encode(framing::Buffer& buffer); - void setValue(uint64_t f, uint64_t s) { first = f; second = s; } - - bool operator==(const ObjectId& other) const; - bool operator!=(const ObjectId& other) const; - bool operator<(const ObjectId& other) const; - bool operator>(const ObjectId& other) const; - bool operator<=(const ObjectId& other) const; - bool operator>=(const ObjectId& other) const; - - private: - uint64_t first; - uint64_t second; - }; - - QPID_CONSOLE_EXTERN std::ostream& operator<<(std::ostream& o, const ObjectId& id); -} -} - -#endif diff --git a/cpp/include/qpid/console/Package.h b/cpp/include/qpid/console/Package.h deleted file mode 100644 index 3b59e366ff..0000000000 --- a/cpp/include/qpid/console/Package.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -#ifndef _QPID_CONSOLE_PACKAGE_H_ -#define _QPID_CONSOLE_PACKAGE_H_ - -#include <string> -#include <map> -#include "qpid/console/ConsoleImportExport.h" -#include "qpid/sys/IntegerTypes.h" - -namespace qpid { -namespace console { - struct SchemaClass; - - /** - * - * \ingroup qmfconsoleapi - */ - class Package { - public: - Package(const std::string& n) : name(n) {} - const std::string& getName() const { return name; } - - private: - friend class SessionManager; - struct NameHash { - std::string name; - uint8_t hash[16]; - NameHash(const std::string& n, const uint8_t* h) : name(n) { - for (int i = 0; i < 16; i++) - hash[i] = h[i]; - } - }; - - struct NameHashComp { - bool operator() (const NameHash& lhs, const NameHash& rhs) const - { - if (lhs.name != rhs.name) - return lhs.name < rhs.name; - else - for (int i = 0; i < 16; i++) - if (lhs.hash[i] != rhs.hash[i]) - return lhs.hash[i] < rhs.hash[i]; - return false; - } - }; - - typedef std::map<NameHash, SchemaClass*, NameHashComp> ClassMap; - - const std::string name; - ClassMap classes; - - SchemaClass* getClass(const std::string& className, uint8_t* hash); - void addClass(const std::string& className, uint8_t* hash, - SchemaClass* schemaClass); - }; -} -} - -#endif diff --git a/cpp/include/qpid/console/Schema.h b/cpp/include/qpid/console/Schema.h deleted file mode 100644 index 6d4e41ab3e..0000000000 --- a/cpp/include/qpid/console/Schema.h +++ /dev/null @@ -1,105 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -#ifndef _QPID_CONSOLE_SCHEMA_H_ -#define _QPID_CONSOLE_SCHEMA_H_ - -#include "qpid/console/ClassKey.h" -#include <boost/shared_ptr.hpp> -#include <vector> - -namespace qpid { -namespace framing { - class Buffer; -} -namespace console { - class Value; - - struct SchemaArgument { - SchemaArgument(framing::Buffer& buffer, bool forMethod = false); - boost::shared_ptr<Value> decodeValue(framing::Buffer& buffer); - - std::string name; - uint8_t typeCode; - bool dirInput; - bool dirOutput; - std::string unit; - int min; - int max; - int maxLen; - std::string desc; - std::string defaultVal; - }; - - struct SchemaProperty { - SchemaProperty(framing::Buffer& buffer); - boost::shared_ptr<Value> decodeValue(framing::Buffer& buffer); - - std::string name; - uint8_t typeCode; - uint8_t accessCode; - bool isIndex; - bool isOptional; - std::string unit; - int min; - int max; - int maxLen; - std::string desc; - }; - - struct SchemaStatistic { - SchemaStatistic(framing::Buffer& buffer); - boost::shared_ptr<Value> decodeValue(framing::Buffer& buffer); - - std::string name; - uint8_t typeCode; - std::string unit; - std::string desc; - }; - - struct SchemaMethod { - SchemaMethod(framing::Buffer& buffer); - ~SchemaMethod(); - - std::string name; - std::string desc; - std::vector<SchemaArgument*> arguments; - }; - - struct SchemaClass { - static const uint8_t KIND_TABLE = 1; - static const uint8_t KIND_EVENT = 2; - - SchemaClass(const uint8_t kind, const ClassKey& key, framing::Buffer& buffer); - ~SchemaClass(); - const ClassKey& getClassKey() const { return key; } - - const uint8_t kind; - const ClassKey key; - std::vector<SchemaProperty*> properties; - std::vector<SchemaStatistic*> statistics; - std::vector<SchemaMethod*> methods; - std::vector<SchemaArgument*> arguments; - }; -} -} - - -#endif diff --git a/cpp/include/qpid/console/SequenceManager.h b/cpp/include/qpid/console/SequenceManager.h deleted file mode 100644 index ea0ccf3f77..0000000000 --- a/cpp/include/qpid/console/SequenceManager.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -#ifndef _QPID_CONSOLE_SEQUENCEMANAGER_H_ -#define _QPID_CONSOLE_SEQUENCEMANAGER_H_ - -#include "qpid/console/ConsoleImportExport.h" -#include "qpid/sys/Mutex.h" -#include <map> -#include <string> -#include <set> - -namespace qpid { -namespace console { - - /** - * - * \ingroup qpidconsoleapi - */ - class SequenceManager { - public: - typedef std::set<uint32_t> set; - - SequenceManager() : sequence(0) {} - QPID_CONSOLE_EXTERN uint32_t reserve(const std::string& context = ""); - QPID_CONSOLE_EXTERN std::string release(uint32_t seq); - - private: - sys::Mutex lock; - uint32_t sequence; - std::map<uint32_t, std::string> pending; - }; -} -} - - -#endif diff --git a/cpp/include/qpid/console/SessionManager.h b/cpp/include/qpid/console/SessionManager.h deleted file mode 100644 index b46af549ff..0000000000 --- a/cpp/include/qpid/console/SessionManager.h +++ /dev/null @@ -1,219 +0,0 @@ -#ifndef _QPID_CONSOLE_SESSION_MANAGER_H -#define _QPID_CONSOLE_SESSION_MANAGER_H - -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ - -#include "qpid/console/ConsoleImportExport.h" -#include "qpid/console/Broker.h" -#include "qpid/console/Package.h" -#include "qpid/console/SequenceManager.h" -#include "qpid/console/ClassKey.h" -#include "qpid/console/Schema.h" -#include "qpid/console/Agent.h" -#include "qpid/console/Object.h" -#include "qpid/console/ObjectId.h" -#include "qpid/console/Value.h" -#include "qpid/sys/Mutex.h" -#include "qpid/sys/Condition.h" -#include "qpid/client/ConnectionSettings.h" -#include <string> -#include <vector> - -namespace qpid { -namespace console { - -class ConsoleListener; - -/** - * - * \ingroup qmfconsoleapi - */ -class SessionManager -{ - public: - typedef std::vector<std::string> NameVector; - typedef std::vector<ClassKey> KeyVector; - QPID_CONSOLE_EXTERN ~SessionManager(); - - struct Settings { - bool rcvObjects; - bool rcvEvents; - bool rcvHeartbeats; - bool userBindings; - uint32_t methodTimeout; - uint32_t getTimeout; - - Settings() : rcvObjects(true), rcvEvents(true), rcvHeartbeats(true), - userBindings(false), methodTimeout(20), getTimeout(20) - {} - }; - - /** Create a new SessionManager - * - * Provide your own subclass of ConsoleListener to receive updates and indications - * asynchronously or leave it as its default and use only synchronous methods. - * - *@param listener Listener object to receive asynchronous indications. - *@param settings.rcvObjects Listener wishes to receive managed object data. - *@param settings.rcvEvents Listener wishes to receive events. - *@param settings.rcvHeartbeats Listener wishes to receive agent heartbeats. - *@param settings.userBindings If rcvObjects is true, userBindings allows the - * console client to control which object classes are received. See the bindPackage - * and bindClass methods. If userBindings is false, the listener will receive - * updates for all object classes. - */ - QPID_CONSOLE_EXTERN SessionManager(ConsoleListener* listener = 0, - Settings settings = Settings()); - - /** Connect a broker to the console session - * - *@param settings Connection settings for client access - *@return broker object if operation is successful - * an exception shall be thrown. - */ - QPID_CONSOLE_EXTERN Broker* addBroker(client::ConnectionSettings& settings); - - /** Disconnect a broker from the console session - * - *@param broker The broker object returned from an earlier call to addBroker. - */ - QPID_CONSOLE_EXTERN void delBroker(Broker* broker); - - /** Get a list of known management packages - * - *@param packages Vector of package names returned by the session manager. - */ - QPID_CONSOLE_EXTERN void getPackages(NameVector& packages); - - /** Get a list of class keys associated with a package - * - *@param classKeys List of class keys returned by the session manager. - *@param packageName Name of package being queried. - */ - QPID_CONSOLE_EXTERN void getClasses(KeyVector& classKeys, - const std::string& packageName); - - /** Get the schema of a class given its class key - * - *@param classKey Class key of the desired schema. - */ - QPID_CONSOLE_EXTERN SchemaClass& getSchema(const ClassKey& classKey); - - /** Request that updates be received for all classes within a package - * - * Note that this method is only meaningful if a ConsoleListener was provided at session - * creation and if the 'userBindings' flag was set to true. - * - *@param packageName Name of the package to which to bind. - */ - QPID_CONSOLE_EXTERN void bindPackage(const std::string& packageName); - - /** Request update to be received for a particular class - * - * Note that this method is only meaningful if a ConsoleListener was provided at session - * creation and if the 'userBindings' flag was set to true. - * - *@param classKey Class key of class to which to bind. - */ - QPID_CONSOLE_EXTERN void bindClass(const ClassKey& classKey); - QPID_CONSOLE_EXTERN void bindClass(const std::string& packageName, - const std::string& className); - - /** Request events from a particular package. - * - * Note that this method is only meaningful if a ConsoleListener was provided at session - * creation and if the 'userBindings' flag was set to true. - * - * @param classKey Class key of event of interest - * @param packageName Name of package of event of interest. - * @param eventName Name of event of interest. Default=All events defined by package. - */ - QPID_CONSOLE_EXTERN void bindEvent(const ClassKey& classKey); - QPID_CONSOLE_EXTERN void bindEvent(const std::string& packageName, - const std::string& eventName=""); - - - /** Get a list of qmf agents known to the session manager. - * - *@param agents Vector of Agent objects returned by the session manager. - *@param broker Return agents registered with this broker only. If NULL, return agents - * from all connected brokers. - */ - QPID_CONSOLE_EXTERN void getAgents(Agent::Vector& agents, - Broker* broker = 0); - - /** Get objects from agents. There are four variants of this method with different ways of - * specifying from which class objects are being queried. - * - *@param objects List of objects received. - *@param classKey ClassKey object identifying class to be queried. - *@param className Class name identifying class to be queried. - *@param objectId Object Id of the single object to be queried. - *@param broker Restrict the query to this broker, or all brokers if NULL. - *@param agent Restrict the query to this agent, or all agents if NULL. - */ - QPID_CONSOLE_EXTERN void getObjects(Object::Vector& objects, - const std::string& className, - Broker* broker = 0, - Agent* agent = 0); - //void getObjects(Object::Vector& objects, const ClassKey& classKey, - // Broker* broker = 0, Agent* agent = 0); - //void getObjects(Object::Vector& objects, const ObjectId& objectId, - // Broker* broker = 0, Agent* agent = 0); - -private: - friend class Broker; - friend class Broker::ConnectionThread; - friend class Object; - sys::Mutex lock; - sys::Mutex brokerListLock; - ConsoleListener* listener; - std::vector<Broker*> brokers; - std::map<std::string, Package*> packages; - SequenceManager sequenceManager; - sys::Condition cv; - SequenceManager::set syncSequenceList; - Object::Vector getResult; - std::string error; - Settings settings; - NameVector bindingKeyList; - - void bindingKeys(); - void allBrokersStable(); - void startProtocol(Broker* broker); - void handleBrokerResp(Broker* broker, framing::Buffer& inBuffer, uint32_t sequence); - void handlePackageInd(Broker* broker, framing::Buffer& inBuffer, uint32_t sequence); - void handleCommandComplete(Broker* broker, framing::Buffer& inBuffer, uint32_t sequence); - void handleClassInd(Broker* broker, framing::Buffer& inBuffer, uint32_t sequence); - void handleMethodResp(Broker* broker, framing::Buffer& inBuffer, uint32_t sequence); - void handleHeartbeatInd(Broker* broker, framing::Buffer& inBuffer, uint32_t sequence); - void handleEventInd(Broker* broker, framing::Buffer& inBuffer, uint32_t sequence); - void handleSchemaResp(Broker* broker, framing::Buffer& inBuffer, uint32_t sequence); - void handleContentInd(Broker* broker, framing::Buffer& inBuffer, uint32_t sequence, bool prop, bool stat); - void handleBrokerConnect(Broker* broker); - void handleBrokerDisconnect(Broker* broker); - -}; - -}} // namespace qpid::console - -#endif /*!_QPID_CONSOLE_SESSION_MANAGER_H*/ diff --git a/cpp/include/qpid/console/Value.h b/cpp/include/qpid/console/Value.h deleted file mode 100644 index d9eb65053b..0000000000 --- a/cpp/include/qpid/console/Value.h +++ /dev/null @@ -1,213 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -#ifndef _QPID_CONSOLE_VALUE_H_ -#define _QPID_CONSOLE_VALUE_H_ - -#include "qpid/Exception.h" -#include "qpid/framing/Uuid.h" -#include "qpid/framing/FieldTable.h" -#include "qpid/console/ObjectId.h" -#include <boost/shared_ptr.hpp> - -namespace qpid { -namespace framing { - class Buffer; -} -namespace console { - - /** - * \ingroup qmfconsoleapi - */ - class Value { - - public: - typedef boost::shared_ptr<Value> Ptr; - virtual ~Value() {} - virtual std::string str() const = 0; - - virtual bool isNull() const { return false; } - virtual bool isObjectId() const { return false; } - virtual bool isUint() const { return false; } - virtual bool isInt() const { return false; } - virtual bool isUint64() const { return false; } - virtual bool isInt64() const { return false; } - virtual bool isString() const { return false; } - virtual bool isBool() const { return false; } - virtual bool isFloat() const { return false; } - virtual bool isDouble() const { return false; } - virtual bool isUuid() const { return false; } - virtual bool isMap() const { return false; } - - virtual ObjectId asObjectId() const { incompatible(); return ObjectId(); } - virtual uint32_t asUint() const { incompatible(); return 0; } - virtual int32_t asInt() const { incompatible(); return 0; } - virtual uint64_t asUint64() const { incompatible(); return 0; } - virtual int64_t asInt64() const { incompatible(); return 0; } - virtual std::string asString() const { incompatible(); return std::string(); } - virtual bool asBool() const { incompatible(); return false; } - virtual float asFloat() const { incompatible(); return 0.0; } - virtual double asDouble() const { incompatible(); return 0.0; } - virtual framing::Uuid asUuid() const { incompatible(); return framing::Uuid(); } - virtual framing::FieldTable asMap() const { incompatible(); return framing::FieldTable(); } - - private: - void incompatible() const { - throw Exception("Incompatible Type"); - } - }; - - class NullValue : public Value { - public: - NullValue() {} - std::string str() const; - bool isNull() const { return true; } - }; - - class RefValue : public Value { - public: - RefValue(ObjectId v) : value(v) {} - RefValue(framing::Buffer& buffer); - std::string str() const; - bool isObjectId() const { return true; } - ObjectId asObjectId() const { return value; } - private: - ObjectId value; - }; - - class UintValue : public Value { - public: - UintValue(uint32_t v) : value(v) {} - std::string str() const; - bool isUint() const { return true; } - uint32_t asUint() const { return value; } - bool isUint64() const { return true; } - uint64_t asUint64() const { return (uint64_t) value; } - private: - uint32_t value; - }; - - class IntValue : public Value { - public: - IntValue(int32_t v) : value(v) {} - std::string str() const; - bool isInt() const { return true; } - int32_t asInt() const { return value; } - bool isInt64() const { return true; } - int64_t asInt64() const { return (int64_t) value; } - private: - int32_t value; - }; - - class Uint64Value : public Value { - public: - Uint64Value(uint64_t v) : value(v) {} - std::string str() const; - bool isUint64() const { return true; } - uint64_t asUint64() const { return value; } - private: - uint64_t value; - }; - - class Int64Value : public Value { - public: - Int64Value(int64_t v) : value(v) {} - std::string str() const; - bool isInt64() const { return true; } - int64_t asInt64() const { return value; } - private: - int64_t value; - }; - - class StringValue : public Value { - public: - StringValue(const std::string& v) : value(v) {} - StringValue(framing::Buffer& buffer, int tc); - std::string str() const { return value; } - bool isString() const { return true; } - std::string asString() const { return value; } - private: - std::string value; - }; - - class BoolValue : public Value { - public: - BoolValue(bool v) : value(v) {} - BoolValue(uint8_t v) : value(v != 0) {} - std::string str() const; - bool isBool() const { return true; } - bool asBool() const { return value; } - private: - bool value; - }; - - class FloatValue : public Value { - public: - FloatValue(float v) : value(v) {} - std::string str() const; - bool isFloat() const { return true; } - float asFloat() const { return value; } - bool isDouble() const { return true; } - double asDouble() const { return (double) value; } - private: - float value; - }; - - class DoubleValue : public Value { - public: - DoubleValue(double v) : value(v) {} - std::string str() const; - bool isDouble() const { return true; } - double asDouble() const { return value; } - private: - double value; - }; - - class UuidValue : public Value { - public: - UuidValue(const framing::Uuid& v) : value(v) {} - UuidValue(framing::Buffer& buffer); - std::string str() const { return value.str(); } - bool isUuid() const { return true; } - framing::Uuid asUuid() const { return value; } - private: - framing::Uuid value; - }; - - class MapValue : public Value { - public: - MapValue(const framing::FieldTable& v) : value(v) {} - MapValue(framing::Buffer& buffer); - std::string str() const; - bool isMap() const { return true; } - framing::FieldTable asMap() const { return value; } - private: - framing::FieldTable value; - }; - - class ValueFactory { - public: - static Value::Ptr newValue(int typeCode, framing::Buffer& buffer); - static void encodeValue(int typeCode, Value::Ptr value, framing::Buffer& buffer); - }; -} -} - -#endif diff --git a/cpp/src/CMakeLists.txt b/cpp/src/CMakeLists.txt index 5d5dd034b1..6869d6aeee 100644 --- a/cpp/src/CMakeLists.txt +++ b/cpp/src/CMakeLists.txt @@ -1463,49 +1463,6 @@ endif (NOT WIN32) COMPONENT ${QPID_COMPONENT_QMF}) install_pdb (qmf2 ${QPID_COMPONENT_QMF}) -set (qmfconsole_SOURCES - qpid/console/Agent.cpp - qpid/console/Broker.cpp - qpid/console/ClassKey.cpp - qpid/console/Event.cpp - qpid/console/Object.cpp - qpid/console/ObjectId.cpp - qpid/console/Package.cpp - qpid/console/Schema.cpp - qpid/console/SequenceManager.cpp - qpid/console/SessionManager.cpp - qpid/console/Value.cpp - ) -set (qmfconsole_HEADERS - ../include/qpid/console/Agent.h - ../include/qpid/console/Broker.h - ../include/qpid/console/ClassKey.h - ../include/qpid/console/ConsoleImportExport.h - ../include/qpid/console/ConsoleListener.h - ../include/qpid/console/Event.h - ../include/qpid/console/Object.h - ../include/qpid/console/ObjectId.h - ../include/qpid/console/Package.h - ../include/qpid/console/Schema.h - ../include/qpid/console/SequenceManager.h - ../include/qpid/console/SessionManager.h - ../include/qpid/console/Value.h - ) -add_msvc_version (qmfconsole library dll) -add_library (qmfconsole SHARED ${qmfconsole_SOURCES}) -target_link_libraries (qmfconsole qpidclient) -set_target_properties (qmfconsole PROPERTIES - VERSION ${qmfconsole_version} - SOVERSION ${qmfconsole_version_major}) -install (TARGETS qmfconsole - DESTINATION ${QPID_INSTALL_LIBDIR} - COMPONENT ${QPID_COMPONENT_QMF}) -install (FILES ${qmfconsole_HEADERS} - DESTINATION ${QPID_INSTALL_INCLUDEDIR}/qpid/console - COMPONENT ${QPID_COMPONENT_QMF}) -install_pdb (qmfconsole ${QPID_COMPONENT_QMF}) - - # # Legacy store # diff --git a/cpp/src/qpid/console/Agent.cpp b/cpp/src/qpid/console/Agent.cpp deleted file mode 100644 index fa76a13583..0000000000 --- a/cpp/src/qpid/console/Agent.cpp +++ /dev/null @@ -1,30 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ - -#include "qpid/console/Agent.h" - -std::ostream& qpid::console::operator<<(std::ostream& o, const Agent& agent) -{ - o << "Agent at bank " << agent.getBrokerBank() << "." << agent.getAgentBank() << - " (" << agent.getLabel() << ")"; - return o; -} - diff --git a/cpp/src/qpid/console/Broker.cpp b/cpp/src/qpid/console/Broker.cpp deleted file mode 100644 index 86a17d4a10..0000000000 --- a/cpp/src/qpid/console/Broker.cpp +++ /dev/null @@ -1,333 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ - -#include "qpid/console/Broker.h" -#include "qpid/console/Object.h" -#include "qpid/console/Value.h" -#include "qpid/console/SessionManager.h" -#include "qpid/console/ConsoleListener.h" -#include "qpid/log/Statement.h" -#include "qpid/sys/SystemInfo.h" - -using namespace qpid::client; -using namespace qpid::console; -using namespace qpid::framing; -using namespace qpid::sys; -using namespace std; - -Broker::Broker(SessionManager& sm, ConnectionSettings& settings) : - sessionManager(sm), connected(false), connectionSettings(settings), - reqsOutstanding(1), syncInFlight(false), topicBound(false), methodObject(0), - connThreadBody(*this), connThread(connThreadBody) -{ - string osName; - string nodeName; - string release; - string version; - string machine; - - sys::SystemInfo::getSystemId(osName, nodeName, release, version, machine); - uint32_t pid = sys::SystemInfo::getParentProcessId(); - - stringstream text; - - text << "qmfc-cpp-" << nodeName << "-" << pid; - amqpSessionId = string(text.str()); - - QPID_LOG(debug, "Broker::Broker: constructed, amqpSessionId=" << amqpSessionId); -} - -Broker::~Broker() -{ - connThreadBody.shutdown(); - connThread.join(); - resetAgents(); - // resetAgents() does not delete the broker agent... - for (AgentMap::iterator iter = agents.begin(); iter != agents.end(); iter++) { - delete iter->second; - } -} - -string Broker::getUrl() const -{ - stringstream url; - url << connectionSettings.host << ":" << connectionSettings.port; - return url.str(); -} - -void Broker::encodeHeader(Buffer& buf, uint8_t opcode, uint32_t seq) const -{ - buf.putOctet('A'); - buf.putOctet('M'); - buf.putOctet('2'); - buf.putOctet(opcode); - buf.putLong (seq); -} - -bool Broker::checkHeader(Buffer& buf, uint8_t *opcode, uint32_t *seq) const -{ - if (buf.getSize() < 8) - return false; - - uint8_t h1 = buf.getOctet(); - uint8_t h2 = buf.getOctet(); - uint8_t h3 = buf.getOctet(); - - *opcode = buf.getOctet(); - *seq = buf.getLong(); - - return h1 == 'A' && h2 == 'M' && h3 == '2'; -} - -void Broker::received(qpid::client::Message& msg) -{ -#define QMF_HEADER_SIZE 8 - string data = msg.getData(); - Buffer inBuffer(const_cast<char*>(data.c_str()), data.size()); - uint8_t opcode; - uint32_t sequence; - - while (inBuffer.available() >= QMF_HEADER_SIZE) { - if (checkHeader(inBuffer, &opcode, &sequence)) { - QPID_LOG(trace, "Broker::received: opcode=" << opcode << " seq=" << sequence); - - if (opcode == 'b') sessionManager.handleBrokerResp(this, inBuffer, sequence); - else if (opcode == 'p') sessionManager.handlePackageInd(this, inBuffer, sequence); - else if (opcode == 'z') sessionManager.handleCommandComplete(this, inBuffer, sequence); - else if (opcode == 'q') sessionManager.handleClassInd(this, inBuffer, sequence); - else if (opcode == 'm') sessionManager.handleMethodResp(this, inBuffer, sequence); - else if (opcode == 'h') sessionManager.handleHeartbeatInd(this, inBuffer, sequence); - else if (opcode == 'e') sessionManager.handleEventInd(this, inBuffer, sequence); - else if (opcode == 's') sessionManager.handleSchemaResp(this, inBuffer, sequence); - else if (opcode == 'c') sessionManager.handleContentInd(this, inBuffer, sequence, true, false); - else if (opcode == 'i') sessionManager.handleContentInd(this, inBuffer, sequence, false, true); - else if (opcode == 'g') sessionManager.handleContentInd(this, inBuffer, sequence, true, true); - } else - return; - } -} - -void Broker::resetAgents() -{ - for (AgentMap::iterator iter = agents.begin(); iter != agents.end(); iter++) { - if (sessionManager.listener != 0) - sessionManager.listener->delAgent(*(iter->second)); - delete iter->second; - } - - agents.clear(); - agents[0x0000000100000000LL] = new Agent(this, 0, "BrokerAgent"); -} - -void Broker::updateAgent(const Object& object) -{ - uint32_t brokerBank = object.attrUint("brokerBank"); - uint32_t agentBank = object.attrUint("agentBank"); - uint64_t agentKey = ((uint64_t) brokerBank << 32) | (uint64_t) agentBank; - AgentMap::iterator iter = agents.find(agentKey); - - if (object.isDeleted()) { - if (iter != agents.end()) { - if (sessionManager.listener != 0) - sessionManager.listener->delAgent(*(iter->second)); - delete iter->second; - agents.erase(iter); - } - } else { - if (iter == agents.end()) { - Agent* agent = new Agent(this, agentBank, object.attrString("label")); - agents[agentKey] = agent; - if (sessionManager.listener != 0) - sessionManager.listener->newAgent(*agent); - } - } -} - -void Broker::ConnectionThread::run() -{ - static const int delayMin(1); - static const int delayMax(128); - static const int delayFactor(2); - int delay(delayMin); - string dest("qmfc"); - - sessionId.generate(); - queueName << "qmfc-" << sessionId; - - while (true) { - try { - broker.topicBound = false; - broker.reqsOutstanding = 1; - connection.open(broker.connectionSettings); - session = connection.newSession(queueName.str()); - subscriptions = new client::SubscriptionManager(session); - - session.queueDeclare(arg::queue=queueName.str(), arg::autoDelete=true, - arg::exclusive=true); - session.exchangeBind(arg::exchange="amq.direct", arg::queue=queueName.str(), - arg::bindingKey=queueName.str()); - - subscriptions->setAcceptMode(ACCEPT_MODE_NONE); - subscriptions->setAcquireMode(ACQUIRE_MODE_PRE_ACQUIRED); - subscriptions->subscribe(broker, queueName.str(), dest); - subscriptions->setFlowControl(dest, FlowControl::unlimited()); - { - Mutex::ScopedLock _lock(connLock); - if (shuttingDown) - return; - operational = true; - broker.resetAgents(); - broker.connected = true; - broker.sessionManager.handleBrokerConnect(&broker); - broker.sessionManager.startProtocol(&broker); - try { - Mutex::ScopedUnlock _unlock(connLock); - subscriptions->run(); - } catch (std::exception) {} - - operational = false; - broker.connected = false; - broker.sessionManager.handleBrokerDisconnect(&broker); - } - delay = delayMin; - connection.close(); - delete subscriptions; - subscriptions = 0; - } catch (std::exception &e) { - QPID_LOG(debug, " outer exception: " << e.what()); - if (delay < delayMax) - delay *= delayFactor; - } - - { - Mutex::ScopedLock _lock(connLock); - if (shuttingDown) - return; - { - Mutex::ScopedUnlock _unlock(connLock); - ::sleep(delay); - } - if (shuttingDown) - return; - } - } -} - -Broker::ConnectionThread::~ConnectionThread() -{ - if (subscriptions != 0) { - delete subscriptions; - } -} - -void Broker::ConnectionThread::sendBuffer(Buffer& buf, uint32_t length, - const string& exchange, const string& routingKey) -{ - { - Mutex::ScopedLock _lock(connLock); - if (!operational) - return; - } - - client::Message msg; - string data; - - buf.getRawData(data, length); - msg.getDeliveryProperties().setRoutingKey(routingKey); - msg.getMessageProperties().setReplyTo(ReplyTo("amq.direct", queueName.str())); - msg.setData(data); - try { - session.messageTransfer(arg::content=msg, arg::destination=exchange); - } catch(std::exception&) {} -} - -void Broker::ConnectionThread::bindExchange(const std::string& exchange, const std::string& key) -{ - { - Mutex::ScopedLock _lock(connLock); - if (!operational) - return; - } - - QPID_LOG(debug, "Broker::ConnectionThread::bindExchange: exchange=" << exchange << " key=" << key); - session.exchangeBind(arg::exchange=exchange, arg::queue=queueName.str(), - arg::bindingKey=key); -} - -void Broker::ConnectionThread::shutdown() -{ - { - Mutex::ScopedLock _lock(connLock); - shuttingDown = true; - } - if (subscriptions) - subscriptions->stop(); -} - -void Broker::waitForStable() -{ - Mutex::ScopedLock l(lock); - if (reqsOutstanding == 0) - return; - syncInFlight = true; - while (reqsOutstanding != 0) { - bool result = cond.wait(lock, AbsTime(now(), TIME_SEC * sessionManager.settings.getTimeout)); - if (!result) - throw(Exception("Timed out waiting for broker to synchronize")); - } -} - -void Broker::incOutstanding() -{ - Mutex::ScopedLock l(lock); - reqsOutstanding++; -} - -void Broker::decOutstanding() -{ - Mutex::ScopedLock l(lock); - reqsOutstanding--; - if (reqsOutstanding == 0) { - if (!topicBound) { - topicBound = true; - for (vector<string>::const_iterator iter = sessionManager.bindingKeyList.begin(); - iter != sessionManager.bindingKeyList.end(); iter++) - connThreadBody.bindExchange("qpid.management", *iter); - } - if (syncInFlight) { - syncInFlight = false; - cond.notify(); - } - } -} - -void Broker::appendAgents(Agent::Vector& agentlist) const -{ - for (AgentMap::const_iterator iter = agents.begin(); iter != agents.end(); iter++) { - agentlist.push_back(iter->second); - } -} - -ostream& qpid::console::operator<<(ostream& o, const Broker& k) -{ - o << "Broker: " << k.connectionSettings.host << ":" << k.connectionSettings.port; - return o; -} diff --git a/cpp/src/qpid/console/ClassKey.cpp b/cpp/src/qpid/console/ClassKey.cpp deleted file mode 100644 index d4b59fc413..0000000000 --- a/cpp/src/qpid/console/ClassKey.cpp +++ /dev/null @@ -1,106 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ - -#include "qpid/console/ClassKey.h" -#include <string.h> -#include <iostream> -#include <cstdio> - -using namespace std; -using namespace qpid::console; - -ClassKey::ClassKey(const string& _package, const string& _name, const uint8_t* _hash) : - package(_package), name(_name) -{ - ::memcpy(hash, _hash, HASH_SIZE); -} - -string ClassKey::getHashString() const -{ - char cstr[36]; - ::sprintf(cstr, "%02x%02x%02x%02x-%02x%02x%02x%02x-%02x%02x%02x%02x-%02x%02x%02x%02x", - hash[0], hash[1], hash[2], hash[3], hash[4], hash[5], hash[6], hash[7], - hash[8], hash[9], hash[10], hash[11], hash[12], hash[13], hash[14], hash[15]); - return string(cstr); -} - -string ClassKey::str() const -{ - string result(package + ":" + name + "(" + getHashString() + ")"); - return result; -} - -bool ClassKey::operator==(const ClassKey& other) const -{ - return ::memcmp(hash, other.hash, HASH_SIZE) == 0 && - name == other.name && - package == other.package; -} - -bool ClassKey::operator!=(const ClassKey& other) const -{ - return !(*this == other); -} - -bool ClassKey::operator<(const ClassKey& other) const -{ - int cmp = ::memcmp(hash, other.hash, HASH_SIZE); - if (cmp != 0) - return cmp < 0; - cmp = name.compare(other.name); - if (cmp != 0) - return cmp < 0; - return package < other.package; -} - -bool ClassKey::operator>(const ClassKey& other) const -{ - int cmp = ::memcmp(hash, other.hash, HASH_SIZE); - if (cmp != 0) - return cmp > 0; - cmp = name.compare(other.name); - if (cmp != 0) - return cmp > 0; - return package > other.package; -} - -bool ClassKey::operator<=(const ClassKey& other) const -{ - return !(*this > other); -} - -bool ClassKey::operator>=(const ClassKey& other) const -{ - return !(*this < other); -} - -void ClassKey::encode(qpid::framing::Buffer& buffer) const -{ - buffer.putShortString(package); - buffer.putShortString(name); - buffer.putBin128(const_cast<uint8_t*>(hash)); -} - -ostream& qpid::console::operator<<(ostream& o, const ClassKey& k) -{ - o << k.str(); - return o; -} diff --git a/cpp/src/qpid/console/Event.cpp b/cpp/src/qpid/console/Event.cpp deleted file mode 100644 index 3e14804b35..0000000000 --- a/cpp/src/qpid/console/Event.cpp +++ /dev/null @@ -1,205 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ - -#include "qpid/console/Broker.h" -#include "qpid/console/ClassKey.h" -#include "qpid/console/Schema.h" -#include "qpid/console/Event.h" -#include "qpid/console/Value.h" -#include "qpid/sys/Time.h" -#include "qpid/framing/Buffer.h" - -using namespace qpid::console; -using namespace std; -using qpid::framing::Uuid; -using qpid::framing::FieldTable; - -Event::Event(Broker* _broker, SchemaClass* _schema, qpid::framing::Buffer& buffer) : - broker(_broker), schema(_schema) -{ - timestamp = buffer.getLongLong(); - severity = (Severity) buffer.getOctet(); - for (vector<SchemaArgument*>::const_iterator aIter = schema->arguments.begin(); - aIter != schema->arguments.end(); aIter++) { - SchemaArgument* argument = *aIter; - attributes[argument->name] = argument->decodeValue(buffer); - } -} - -const ClassKey& Event::getClassKey() const -{ - return schema->getClassKey(); -} - -string Event::getSeverityString() const -{ - switch (severity) { - case SEV_EMERGENCY : return string("EMER"); - case SEV_ALERT : return string("ALERT"); - case SEV_CRITICAL : return string("CRIT"); - case SEV_ERROR : return string("ERROR"); - case SEV_WARNING : return string("WARN"); - case SEV_NOTICE : return string("NOTIC"); - case SEV_INFO : return string("INFO"); - case SEV_DEBUG : return string("DEBUG"); - } - return string("<UNKNOWN>"); -} - -ObjectId Event::attrRef(const string& key) const -{ - Object::AttributeMap::const_iterator iter = attributes.find(key); - if (iter == attributes.end()) - return ObjectId(); - Value::Ptr val = iter->second; - if (!val->isObjectId()) - return ObjectId(); - return val->asObjectId(); -} - -uint32_t Event::attrUint(const string& key) const -{ - Object::AttributeMap::const_iterator iter = attributes.find(key); - if (iter == attributes.end()) - return 0; - Value::Ptr val = iter->second; - if (!val->isUint()) - return 0; - return val->asUint(); -} - -int32_t Event::attrInt(const string& key) const -{ - Object::AttributeMap::const_iterator iter = attributes.find(key); - if (iter == attributes.end()) - return 0; - Value::Ptr val = iter->second; - if (!val->isInt()) - return 0; - return val->asInt(); -} - -uint64_t Event::attrUint64(const string& key) const -{ - Object::AttributeMap::const_iterator iter = attributes.find(key); - if (iter == attributes.end()) - return 0; - Value::Ptr val = iter->second; - if (!val->isUint64()) - return 0; - return val->asUint64(); -} - -int64_t Event::attrInt64(const string& key) const -{ - Object::AttributeMap::const_iterator iter = attributes.find(key); - if (iter == attributes.end()) - return 0; - Value::Ptr val = iter->second; - if (!val->isInt64()) - return 0; - return val->asInt64(); -} - -string Event::attrString(const string& key) const -{ - Object::AttributeMap::const_iterator iter = attributes.find(key); - if (iter == attributes.end()) - return string(); - Value::Ptr val = iter->second; - if (!val->isString()) - return string(); - return val->asString(); -} - -bool Event::attrBool(const string& key) const -{ - Object::AttributeMap::const_iterator iter = attributes.find(key); - if (iter == attributes.end()) - return false; - Value::Ptr val = iter->second; - if (!val->isBool()) - return false; - return val->asBool(); -} - -float Event::attrFloat(const string& key) const -{ - Object::AttributeMap::const_iterator iter = attributes.find(key); - if (iter == attributes.end()) - return 0.0; - Value::Ptr val = iter->second; - if (!val->isFloat()) - return 0.0; - return val->asFloat(); -} - -double Event::attrDouble(const string& key) const -{ - Object::AttributeMap::const_iterator iter = attributes.find(key); - if (iter == attributes.end()) - return 0.0; - Value::Ptr val = iter->second; - if (!val->isDouble()) - return 0.0; - return val->asDouble(); -} - -Uuid Event::attrUuid(const string& key) const -{ - Object::AttributeMap::const_iterator iter = attributes.find(key); - if (iter == attributes.end()) - return Uuid(); - Value::Ptr val = iter->second; - if (!val->isUuid()) - return Uuid(); - return val->asUuid(); -} - -FieldTable Event::attrMap(const string& key) const -{ - Object::AttributeMap::const_iterator iter = attributes.find(key); - if (iter == attributes.end()) - return FieldTable(); - Value::Ptr val = iter->second; - if (!val->isMap()) - return FieldTable(); - return val->asMap(); -} - - -std::ostream& qpid::console::operator<<(std::ostream& o, const Event& event) -{ - const ClassKey& key = event.getClassKey(); - sys::AbsTime aTime(sys::AbsTime(), sys::Duration(event.getTimestamp())); - o << aTime << " " << event.getSeverityString() << " " << - key.getPackageName() << ":" << key.getClassName() << - " broker=" << event.getBroker()->getUrl(); - - const Object::AttributeMap& attributes = event.getAttributes(); - for (Object::AttributeMap::const_iterator iter = attributes.begin(); - iter != attributes.end(); iter++) { - o << " " << iter->first << "=" << iter->second->str(); - } - return o; -} - - diff --git a/cpp/src/qpid/console/Object.cpp b/cpp/src/qpid/console/Object.cpp deleted file mode 100644 index 6570e293ab..0000000000 --- a/cpp/src/qpid/console/Object.cpp +++ /dev/null @@ -1,384 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ - -#include "qpid/console/SessionManager.h" -#include "qpid/console/Broker.h" -#include "qpid/console/Object.h" -#include "qpid/console/Schema.h" -#include "qpid/console/ClassKey.h" -#include "qpid/console/Value.h" -#include "qpid/framing/Buffer.h" -#include "qpid/sys/Mutex.h" - -using namespace qpid::console; -using namespace qpid::sys; -using namespace qpid; -using namespace std; -using qpid::framing::Uuid; -using qpid::framing::FieldTable; - -void Object::AttributeMap::addRef(const string& key, const ObjectId& val) -{ - (*this)[key] = Value::Ptr(new RefValue(val)); -} - -void Object::AttributeMap::addUint(const string& key, uint32_t val) -{ - (*this)[key] = Value::Ptr(new UintValue(val)); -} - -void Object::AttributeMap::addInt(const string& key, int32_t val) -{ - (*this)[key] = Value::Ptr(new IntValue(val)); -} - -void Object::AttributeMap::addUint64(const string& key, uint64_t val) -{ - (*this)[key] = Value::Ptr(new Uint64Value(val)); -} - -void Object::AttributeMap::addInt64(const string& key, int64_t val) -{ - (*this)[key] = Value::Ptr(new Int64Value(val)); -} - -void Object::AttributeMap::addString(const string& key, const string& val) -{ - (*this)[key] = Value::Ptr(new StringValue(val)); -} - -void Object::AttributeMap::addBool(const string& key, bool val) -{ - (*this)[key] = Value::Ptr(new BoolValue(val)); -} - -void Object::AttributeMap::addFloat(const string& key, float val) -{ - (*this)[key] = Value::Ptr(new FloatValue(val)); -} - -void Object::AttributeMap::addDouble(const string& key, double val) -{ - (*this)[key] = Value::Ptr(new DoubleValue(val)); -} - -void Object::AttributeMap::addUuid(const string& key, const Uuid& val) -{ - (*this)[key] = Value::Ptr(new UuidValue(val)); -} - -void Object::AttributeMap::addMap(const string& key, const FieldTable& val) -{ - (*this)[key] = Value::Ptr(new MapValue(val)); -} - -Object::Object(Broker* b, SchemaClass* s, framing::Buffer& buffer, bool prop, bool stat) : - broker(b), schema(s), pendingMethod(0) -{ - currentTime = buffer.getLongLong(); - createTime = buffer.getLongLong(); - deleteTime = buffer.getLongLong(); - objectId.decode(buffer); - - if (prop) { - set<string> excludes; - parsePresenceMasks(buffer, excludes); - for (vector<SchemaProperty*>::const_iterator pIter = schema->properties.begin(); - pIter != schema->properties.end(); pIter++) { - SchemaProperty* property = *pIter; - if (excludes.count(property->name) != 0) { - attributes[property->name] = Value::Ptr(new NullValue()); - } else { - attributes[property->name] = property->decodeValue(buffer); - } - } - } - - if (stat) { - for (vector<SchemaStatistic*>::const_iterator sIter = schema->statistics.begin(); - sIter != schema->statistics.end(); sIter++) { - SchemaStatistic* statistic = *sIter; - attributes[statistic->name] = statistic->decodeValue(buffer); - } - } -} - -Object::~Object() {} - -const ClassKey& Object::getClassKey() const -{ - return schema->getClassKey(); -} - -string Object::getIndex() const -{ - string result; - - for (vector<SchemaProperty*>::const_iterator pIter = schema->properties.begin(); - pIter != schema->properties.end(); pIter++) { - SchemaProperty* property = *pIter; - if (property->isIndex) { - AttributeMap::const_iterator vIter = attributes.find(property->name); - if (vIter != attributes.end()) { - if (!result.empty()) - result += ":"; - result += vIter->second->str(); - } - } - } - return result; -} - -void Object::mergeUpdate(const Object& /*updated*/) -{ - // TODO -} - -void Object::invokeMethod(const string name, const AttributeMap& args, MethodResponse& result) -{ - for (vector<SchemaMethod*>::const_iterator iter = schema->methods.begin(); - iter != schema->methods.end(); iter++) { - if ((*iter)->name == name) { - SchemaMethod* method = *iter; - char rawbuffer[65536]; - framing::Buffer buffer(rawbuffer, 65536); - uint32_t sequence = broker->sessionManager.sequenceManager.reserve("method"); - pendingMethod = method; - broker->methodObject = this; - broker->encodeHeader(buffer, 'M', sequence); - objectId.encode(buffer); - schema->key.encode(buffer); - buffer.putShortString(name); - - for (vector<SchemaArgument*>::const_iterator aIter = method->arguments.begin(); - aIter != method->arguments.end(); aIter++) { - SchemaArgument* arg = *aIter; - if (arg->dirInput) { - AttributeMap::const_iterator attr = args.find(arg->name); - if (attr != args.end()) { - ValueFactory::encodeValue(arg->typeCode, attr->second, buffer); - } else { - // TODO Use the default value instead of throwing - throw Exception("Missing arguments in method call"); - } - } - } - - uint32_t length = buffer.getPosition(); - buffer.reset(); - stringstream routingKey; - routingKey << "agent." << objectId.getBrokerBank() << "." << objectId.getAgentBank(); - broker->connThreadBody.sendBuffer(buffer, length, "qpid.management", routingKey.str()); - - { - Mutex::ScopedLock l(broker->lock); - bool ok = true; - while (pendingMethod != 0 && ok) { - ok = broker->cond.wait(broker->lock, AbsTime(now(), broker->sessionManager.settings.methodTimeout * TIME_SEC)); - } - - if (!ok) { - result.code = 0x1001; - result.text.assign("Method call timed out"); - result.arguments.clear(); - } else { - result = methodResponse; - } - } - } - } -} - -void Object::handleMethodResp(framing::Buffer& buffer, uint32_t sequence) -{ - broker->sessionManager.sequenceManager.release(sequence); - methodResponse.code = buffer.getLong(); - buffer.getMediumString(methodResponse.text); - methodResponse.arguments.clear(); - - for (vector<SchemaArgument*>::const_iterator aIter = pendingMethod->arguments.begin(); - aIter != pendingMethod->arguments.end(); aIter++) { - SchemaArgument* arg = *aIter; - if (arg->dirOutput) { - methodResponse.arguments[arg->name] = arg->decodeValue(buffer); - } - } - - { - Mutex::ScopedLock l(broker->lock); - pendingMethod = 0; - broker->cond.notify(); - } -} - -ObjectId Object::attrRef(const string& key) const -{ - AttributeMap::const_iterator iter = attributes.find(key); - if (iter == attributes.end()) - return ObjectId(); - Value::Ptr val = iter->second; - if (!val->isObjectId()) - return ObjectId(); - return val->asObjectId(); -} - -uint32_t Object::attrUint(const string& key) const -{ - AttributeMap::const_iterator iter = attributes.find(key); - if (iter == attributes.end()) - return 0; - Value::Ptr val = iter->second; - if (!val->isUint()) - return 0; - return val->asUint(); -} - -int32_t Object::attrInt(const string& key) const -{ - AttributeMap::const_iterator iter = attributes.find(key); - if (iter == attributes.end()) - return 0; - Value::Ptr val = iter->second; - if (!val->isInt()) - return 0; - return val->asInt(); -} - -uint64_t Object::attrUint64(const string& key) const -{ - AttributeMap::const_iterator iter = attributes.find(key); - if (iter == attributes.end()) - return 0; - Value::Ptr val = iter->second; - if (!val->isUint64()) - return 0; - return val->asUint64(); -} - -int64_t Object::attrInt64(const string& key) const -{ - AttributeMap::const_iterator iter = attributes.find(key); - if (iter == attributes.end()) - return 0; - Value::Ptr val = iter->second; - if (!val->isInt64()) - return 0; - return val->asInt64(); -} - -string Object::attrString(const string& key) const -{ - AttributeMap::const_iterator iter = attributes.find(key); - if (iter == attributes.end()) - return string(); - Value::Ptr val = iter->second; - if (!val->isString()) - return string(); - return val->asString(); -} - -bool Object::attrBool(const string& key) const -{ - AttributeMap::const_iterator iter = attributes.find(key); - if (iter == attributes.end()) - return false; - Value::Ptr val = iter->second; - if (!val->isBool()) - return false; - return val->asBool(); -} - -float Object::attrFloat(const string& key) const -{ - AttributeMap::const_iterator iter = attributes.find(key); - if (iter == attributes.end()) - return 0.0; - Value::Ptr val = iter->second; - if (!val->isFloat()) - return 0.0; - return val->asFloat(); -} - -double Object::attrDouble(const string& key) const -{ - AttributeMap::const_iterator iter = attributes.find(key); - if (iter == attributes.end()) - return 0.0; - Value::Ptr val = iter->second; - if (!val->isDouble()) - return 0.0; - return val->asDouble(); -} - -Uuid Object::attrUuid(const string& key) const -{ - AttributeMap::const_iterator iter = attributes.find(key); - if (iter == attributes.end()) - return Uuid(); - Value::Ptr val = iter->second; - if (!val->isUuid()) - return Uuid(); - return val->asUuid(); -} - -FieldTable Object::attrMap(const string& key) const -{ - AttributeMap::const_iterator iter = attributes.find(key); - if (iter == attributes.end()) - return FieldTable(); - Value::Ptr val = iter->second; - if (!val->isMap()) - return FieldTable(); - return val->asMap(); -} - -void Object::parsePresenceMasks(framing::Buffer& buffer, set<string>& excludeList) -{ - excludeList.clear(); - uint8_t bit = 0; - uint8_t mask = 0; - - for (vector<SchemaProperty*>::const_iterator pIter = schema->properties.begin(); - pIter != schema->properties.end(); pIter++) { - SchemaProperty* property = *pIter; - if (property->isOptional) { - if (bit == 0) { - mask = buffer.getOctet(); - bit = 1; - } - if ((mask & bit) == 0) - excludeList.insert(property->name); - if (bit == 0x80) - bit = 0; - else - bit = bit << 1; - } - } -} - -ostream& qpid::console::operator<<(ostream& o, const Object& object) -{ - const ClassKey& key = object.getClassKey(); - o << key.getPackageName() << ":" << key.getClassName() << "[" << object.getObjectId() << "] " << - object.getIndex(); - return o; -} - diff --git a/cpp/src/qpid/console/ObjectId.cpp b/cpp/src/qpid/console/ObjectId.cpp deleted file mode 100644 index fbaad20d57..0000000000 --- a/cpp/src/qpid/console/ObjectId.cpp +++ /dev/null @@ -1,91 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ - -#include "qpid/console/ObjectId.h" -#include "qpid/framing/Buffer.h" - -using namespace qpid::console; -using namespace qpid; -using namespace std; - -ObjectId::ObjectId(framing::Buffer& buffer) -{ - decode(buffer); -} - -void ObjectId::decode(framing::Buffer& buffer) -{ - first = buffer.getLongLong(); - second = buffer.getLongLong(); -} - -void ObjectId::encode(framing::Buffer& buffer) -{ - buffer.putLongLong(first); - buffer.putLongLong(second); -} - -bool ObjectId::operator==(const ObjectId& other) const -{ - return second == other.second && first == other.first; -} - -bool ObjectId::operator!=(const ObjectId& other) const -{ - return !(*this == other); -} - -bool ObjectId::operator<(const ObjectId& other) const -{ - if (first < other.first) - return true; - if (first > other.first) - return false; - return second < other.second; -} - -bool ObjectId::operator>(const ObjectId& other) const -{ - if (first > other.first) - return true; - if (first < other.first) - return false; - return second > other.second; -} - -bool ObjectId::operator<=(const ObjectId& other) const -{ - return !(*this > other); -} - -bool ObjectId::operator>=(const ObjectId& other) const -{ - return !(*this < other); -} - -ostream& qpid::console::operator<<(ostream& o, const ObjectId& id) -{ - o << (int) id.getFlags() << "-" << id.getSequence() << "-" << id.getBrokerBank() << "-" << - id.getAgentBank() << "-" << id.getObject(); - return o; -} - - diff --git a/cpp/src/qpid/console/Package.cpp b/cpp/src/qpid/console/Package.cpp deleted file mode 100644 index e5d6fa29fd..0000000000 --- a/cpp/src/qpid/console/Package.cpp +++ /dev/null @@ -1,41 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ - -#include "qpid/console/Package.h" - -using namespace qpid::console; - -SchemaClass* Package::getClass(const std::string& className, uint8_t* hash) -{ - NameHash key(className, hash); - ClassMap::iterator iter = classes.find(key); - if (iter != classes.end()) - return iter->second; - return 0; -} - -void Package::addClass(const std::string& className, uint8_t* hash, SchemaClass* schemaClass) -{ - NameHash key(className, hash); - ClassMap::iterator iter = classes.find(key); - if (iter == classes.end()) - classes[key] = schemaClass; -} diff --git a/cpp/src/qpid/console/Schema.cpp b/cpp/src/qpid/console/Schema.cpp deleted file mode 100644 index a3dbd91201..0000000000 --- a/cpp/src/qpid/console/Schema.cpp +++ /dev/null @@ -1,165 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ - -#include "qpid/console/Schema.h" -#include "qpid/console/Value.h" -#include "qpid/framing/FieldTable.h" - -using namespace qpid::console; -using namespace qpid; -using std::string; -using std::vector; - -SchemaArgument::SchemaArgument(framing::Buffer& buffer, bool forMethod) -{ - framing::FieldTable map; - map.decode(buffer); - - name = map.getAsString("name"); - typeCode = map.getAsInt("type"); - unit = map.getAsString("unit"); - min = map.getAsInt("min"); - max = map.getAsInt("max"); - maxLen = map.getAsInt("maxlen"); - desc = map.getAsString("desc"); - - dirInput = false; - dirOutput = false; - if (forMethod) { - string dir(map.getAsString("dir")); - if (dir.find('I') != dir.npos || dir.find('i') != dir.npos) - dirInput = true; - if (dir.find('O') != dir.npos || dir.find('o') != dir.npos) - dirOutput = true; - } -} - -Value::Ptr SchemaArgument::decodeValue(framing::Buffer& buffer) -{ - return ValueFactory::newValue(typeCode, buffer); -} - -SchemaProperty::SchemaProperty(framing::Buffer& buffer) -{ - framing::FieldTable map; - map.decode(buffer); - - name = map.getAsString("name"); - typeCode = map.getAsInt("type"); - accessCode = map.getAsInt("access"); - isIndex = map.getAsInt("index") != 0; - isOptional = map.getAsInt("optional") != 0; - unit = map.getAsString("unit"); - min = map.getAsInt("min"); - max = map.getAsInt("max"); - maxLen = map.getAsInt("maxlen"); - desc = map.getAsString("desc"); -} - -Value::Ptr SchemaProperty::decodeValue(framing::Buffer& buffer) -{ - return ValueFactory::newValue(typeCode, buffer); -} - -SchemaStatistic::SchemaStatistic(framing::Buffer& buffer) -{ - framing::FieldTable map; - map.decode(buffer); - - name = map.getAsString("name"); - typeCode = map.getAsInt("type"); - unit = map.getAsString("unit"); - desc = map.getAsString("desc"); -} - -Value::Ptr SchemaStatistic::decodeValue(framing::Buffer& buffer) -{ - return ValueFactory::newValue(typeCode, buffer); -} - -SchemaMethod::SchemaMethod(framing::Buffer& buffer) -{ - framing::FieldTable map; - map.decode(buffer); - - name = map.getAsString("name"); - desc = map.getAsString("desc"); - int argCount = map.getAsInt("argCount"); - - for (int i = 0; i < argCount; i++) - arguments.push_back(new SchemaArgument(buffer, true)); -} - -SchemaMethod::~SchemaMethod() -{ - for (vector<SchemaArgument*>::iterator iter = arguments.begin(); - iter != arguments.end(); iter++) - delete *iter; -} - -SchemaClass::SchemaClass(const uint8_t _kind, const ClassKey& _key, framing::Buffer& buffer) : - kind(_kind), key(_key) -{ - if (kind == KIND_TABLE) { - uint8_t hasSupertype = 0; //buffer.getOctet(); - uint16_t propCount = buffer.getShort(); - uint16_t statCount = buffer.getShort(); - uint16_t methodCount = buffer.getShort(); - - if (hasSupertype) { - string unused; - buffer.getShortString(unused); - buffer.getShortString(unused); - buffer.getLongLong(); - buffer.getLongLong(); - } - - for (uint16_t idx = 0; idx < propCount; idx++) - properties.push_back(new SchemaProperty(buffer)); - for (uint16_t idx = 0; idx < statCount; idx++) - statistics.push_back(new SchemaStatistic(buffer)); - for (uint16_t idx = 0; idx < methodCount; idx++) - methods.push_back(new SchemaMethod(buffer)); - - } else if (kind == KIND_EVENT) { - uint16_t argCount = buffer.getShort(); - - for (uint16_t idx = 0; idx < argCount; idx++) - arguments.push_back(new SchemaArgument(buffer)); - } -} - -SchemaClass::~SchemaClass() -{ - for (vector<SchemaProperty*>::iterator iter = properties.begin(); - iter != properties.end(); iter++) - delete *iter; - for (vector<SchemaStatistic*>::iterator iter = statistics.begin(); - iter != statistics.end(); iter++) - delete *iter; - for (vector<SchemaMethod*>::iterator iter = methods.begin(); - iter != methods.end(); iter++) - delete *iter; - for (vector<SchemaArgument*>::iterator iter = arguments.begin(); - iter != arguments.end(); iter++) - delete *iter; -} - diff --git a/cpp/src/qpid/console/SequenceManager.cpp b/cpp/src/qpid/console/SequenceManager.cpp deleted file mode 100644 index 86ea829749..0000000000 --- a/cpp/src/qpid/console/SequenceManager.cpp +++ /dev/null @@ -1,48 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ - -#include "qpid/console/SequenceManager.h" - -using namespace qpid::console; -using namespace qpid::sys; -using std::string; -using std::cout; -using std::endl; - -uint32_t SequenceManager::reserve(const std::string& context) -{ - Mutex::ScopedLock l(lock); - uint32_t result = sequence++; - pending[result] = context; - return result; -} - -std::string SequenceManager::release(uint32_t seq) -{ - Mutex::ScopedLock l(lock); - std::map<uint32_t, string>::iterator iter = pending.find(seq); - if (iter == pending.end()) - return string(); - string result(iter->second); - pending.erase(iter); - return result; -} - diff --git a/cpp/src/qpid/console/SessionManager.cpp b/cpp/src/qpid/console/SessionManager.cpp deleted file mode 100644 index 910ae22be8..0000000000 --- a/cpp/src/qpid/console/SessionManager.cpp +++ /dev/null @@ -1,516 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -#include "qpid/console/SessionManager.h" -#include "qpid/console/Schema.h" -#include "qpid/console/Agent.h" -#include "qpid/console/ConsoleListener.h" -#include "qpid/log/Statement.h" -#include "qpid/sys/Time.h" -#include "qpid/framing/Buffer.h" -#include "qpid/framing/Uuid.h" -#include "qpid/framing/FieldTable.h" - -using namespace qpid::console; -using namespace qpid::sys; -using namespace qpid; -using namespace std; -using qpid::framing::Buffer; -using qpid::framing::FieldTable; - -SessionManager::SessionManager(ConsoleListener* _listener, Settings _settings) : - listener(_listener), settings(_settings) -{ - bindingKeys(); -} - -SessionManager::~SessionManager() -{ - for (vector<Broker*>::iterator iter = brokers.begin(); - iter != brokers.end(); iter++) - delete *iter; - - for (map<string, Package*>::iterator iter = packages.begin(); - iter != packages.end(); iter++) { - for (Package::ClassMap::iterator citer = iter->second->classes.begin(); - citer != iter->second->classes.end(); - citer++) - delete citer->second; - delete iter->second; - } -} - -Broker* SessionManager::addBroker(client::ConnectionSettings& settings) -{ - Broker* broker(new Broker(*this, settings)); - { - Mutex::ScopedLock l(brokerListLock); - brokers.push_back(broker); - } - return broker; -} - -void SessionManager::delBroker(Broker* broker) -{ - Mutex::ScopedLock l(brokerListLock); - for (vector<Broker*>::iterator iter = brokers.begin(); - iter != brokers.end(); iter++) - if (*iter == broker) { - brokers.erase(iter); - delete broker; - return; - } -} - -void SessionManager::getPackages(NameVector& packageNames) -{ - allBrokersStable(); - packageNames.clear(); - { - Mutex::ScopedLock l(lock); - for (map<string, Package*>::iterator iter = packages.begin(); - iter != packages.end(); iter++) - packageNames.push_back(iter->first); - } -} - -void SessionManager::getClasses(KeyVector& classKeys, const std::string& packageName) -{ - allBrokersStable(); - classKeys.clear(); - map<string, Package*>::iterator iter = packages.find(packageName); - if (iter == packages.end()) - return; - - Package& package = *(iter->second); - for (Package::ClassMap::const_iterator piter = package.classes.begin(); - piter != package.classes.end(); piter++) { - ClassKey key(piter->second->getClassKey()); - classKeys.push_back(key); - } -} - -SchemaClass& SessionManager::getSchema(const ClassKey& classKey) -{ - allBrokersStable(); - map<string, Package*>::iterator iter = packages.find(classKey.getPackageName()); - if (iter == packages.end()) - throw Exception("Unknown package"); - - Package& package = *(iter->second); - Package::NameHash key(classKey.getClassName(), classKey.getHash()); - Package::ClassMap::iterator cIter = package.classes.find(key); - if (cIter == package.classes.end()) - throw Exception("Unknown class"); - - return *(cIter->second); -} - -void SessionManager::bindPackage(const std::string& packageName) -{ - stringstream key; - key << "console.obj.*.*." << packageName << ".#"; - bindingKeyList.push_back(key.str()); - for (vector<Broker*>::iterator iter = brokers.begin(); iter != brokers.end(); iter++) - (*iter)->addBinding(key.str()); -} - -void SessionManager::bindClass(const ClassKey& classKey) -{ - bindClass(classKey.getPackageName(), classKey.getClassName()); -} - -void SessionManager::bindClass(const std::string& packageName, const std::string& className) -{ - stringstream key; - key << "console.obj.*.*." << packageName << "." << className << ".#"; - bindingKeyList.push_back(key.str()); - for (vector<Broker*>::iterator iter = brokers.begin(); - iter != brokers.end(); iter++) - (*iter)->addBinding(key.str()); -} - - -void SessionManager::bindEvent(const ClassKey& classKey) -{ - bindEvent(classKey.getPackageName(), classKey.getClassName()); -} - - -void SessionManager::bindEvent(const std::string& packageName, const std::string& eventName) -{ - if (!settings.userBindings) throw Exception("Session not configured for userBindings."); - if (settings.rcvEvents) throw Exception("Session already configured to receive all events."); - - stringstream key; - key << "console.event.*.*." << packageName; - if (eventName.length()) { - key << "." << eventName << ".#"; - } else { - key << ".#"; - } - - bindingKeyList.push_back(key.str()); - for (vector<Broker*>::iterator iter = brokers.begin(); - iter != brokers.end(); iter++) - (*iter)->addBinding(key.str()); -} - - -void SessionManager::getAgents(Agent::Vector& agents, Broker* broker) -{ - agents.clear(); - if (broker != 0) { - broker->appendAgents(agents); - } else { - for (vector<Broker*>::iterator iter = brokers.begin(); iter != brokers.end(); iter++) { - (*iter)->appendAgents(agents); - } - } -} - -void SessionManager::getObjects(Object::Vector& objects, const std::string& className, - Broker* _broker, Agent* _agent) -{ - Agent::Vector agentList; - - if (_agent != 0) { - agentList.push_back(_agent); - _agent->getBroker()->waitForStable(); - } else { - if (_broker != 0) { - _broker->appendAgents(agentList); - _broker->waitForStable(); - } else { - allBrokersStable(); - Mutex::ScopedLock _lock(brokerListLock); - for (vector<Broker*>::iterator iter = brokers.begin(); iter != brokers.end(); iter++) { - (*iter)->appendAgents(agentList); - } - } - } - - FieldTable ft; - uint32_t sequence; - ft.setString("_class", className); - - getResult.clear(); - syncSequenceList.clear(); - error = string(); - - if (agentList.empty()) { - objects = getResult; - return; - } - - for (Agent::Vector::iterator iter = agentList.begin(); iter != agentList.end(); iter++) { - Agent* agent = *iter; - char rawbuffer[512]; - Buffer buffer(rawbuffer, 512); - stringstream routingKey; - routingKey << "agent." << agent->getBrokerBank() << "." << agent->getAgentBank(); - { - Mutex::ScopedLock _lock(lock); - sequence = sequenceManager.reserve("multiget"); - syncSequenceList.insert(sequence); - } - agent->getBroker()->encodeHeader(buffer, 'G', sequence); - ft.encode(buffer); - uint32_t length = buffer.getPosition(); - buffer.reset(); - agent->getBroker()->connThreadBody.sendBuffer(buffer, length, "qpid.management", routingKey.str()); - } - - { - Mutex::ScopedLock _lock(lock); - sys::AbsTime startTime = sys::now(); - while (!syncSequenceList.empty() && error.empty()) { - cv.wait(lock, AbsTime(now(), settings.getTimeout * TIME_SEC)); - sys::AbsTime currTime = sys::now(); - if (sys::Duration(startTime, currTime) > settings.getTimeout * TIME_SEC) - break; - } - } - - objects = getResult; -} - -void SessionManager::bindingKeys() -{ - bindingKeyList.push_back("schema.#"); - if (settings.rcvObjects && settings.rcvEvents && settings.rcvHeartbeats && !settings.userBindings) { - bindingKeyList.push_back("console.#"); - } else { - if (settings.rcvObjects && !settings.userBindings) - bindingKeyList.push_back("console.obj.#"); - else - bindingKeyList.push_back("console.obj.*.*.org.apache.qpid.broker.agent"); - if (settings.rcvEvents) - bindingKeyList.push_back("console.event.#"); - if (settings.rcvHeartbeats) - bindingKeyList.push_back("console.heartbeat"); - } -} - -void SessionManager::allBrokersStable() -{ - Mutex::ScopedLock l(brokerListLock); - for (vector<Broker*>::iterator iter = brokers.begin(); - iter != brokers.end(); iter++) - if ((*iter)->isConnected()) - (*iter)->waitForStable(); -} - -void SessionManager::startProtocol(Broker* broker) -{ - char rawbuffer[512]; - Buffer buffer(rawbuffer, 512); - - broker->encodeHeader(buffer, 'B'); - uint32_t length = 512 - buffer.available(); - buffer.reset(); - broker->connThreadBody.sendBuffer(buffer, length); -} - - -void SessionManager::handleBrokerResp(Broker* broker, Buffer& inBuffer, uint32_t) -{ - framing::Uuid brokerId; - - brokerId.decode(inBuffer); - broker->setBrokerId(brokerId); - - char rawbuffer[512]; - Buffer buffer(rawbuffer, 512); - - uint32_t sequence = sequenceManager.reserve("startup"); - broker->encodeHeader(buffer, 'P', sequence); - uint32_t length = 512 - buffer.available(); - buffer.reset(); - broker->connThreadBody.sendBuffer(buffer, length); - - if (listener != 0) { - listener->brokerInfo(*broker); - } -} - -void SessionManager::handlePackageInd(Broker* broker, Buffer& inBuffer, uint32_t) -{ - string packageName; - inBuffer.getShortString(packageName); - - { - Mutex::ScopedLock l(lock); - map<string, Package*>::iterator iter = packages.find(packageName); - if (iter == packages.end()) { - packages[packageName] = new Package(packageName); - if (listener != 0) - listener->newPackage(packageName); - } - } - - broker->incOutstanding(); - char rawbuffer[512]; - Buffer buffer(rawbuffer, 512); - - uint32_t sequence = sequenceManager.reserve("startup"); - broker->encodeHeader(buffer, 'Q', sequence); - buffer.putShortString(packageName); - uint32_t length = 512 - buffer.available(); - buffer.reset(); - broker->connThreadBody.sendBuffer(buffer, length); -} - -void SessionManager::handleCommandComplete(Broker* broker, Buffer& inBuffer, uint32_t sequence) -{ - Mutex::ScopedLock l(lock); - uint32_t resultCode = inBuffer.getLong(); - string resultText; - inBuffer.getShortString(resultText); - string context = sequenceManager.release(sequence); - if (resultCode != 0) - QPID_LOG(debug, "Received error in completion: " << resultCode << " " << resultText); - if (context == "startup") { - broker->decOutstanding(); - } else if (context == "multiget") { - if (syncSequenceList.count(sequence) == 1) { - syncSequenceList.erase(sequence); - if (syncSequenceList.empty()) { - cv.notify(); - } - } - } - // TODO: Other context cases -} - -void SessionManager::handleClassInd(Broker* broker, Buffer& inBuffer, uint32_t) -{ - string packageName; - string className; - uint8_t hash[16]; - - /*kind*/ (void) inBuffer.getOctet(); - inBuffer.getShortString(packageName); - inBuffer.getShortString(className); - inBuffer.getBin128(hash); - - { - Mutex::ScopedLock l(lock); - map<string, Package*>::iterator pIter = packages.find(packageName); - if (pIter == packages.end() || pIter->second->getClass(className, hash)) - return; - } - - broker->incOutstanding(); - char rawbuffer[512]; - Buffer buffer(rawbuffer, 512); - - uint32_t sequence = sequenceManager.reserve("startup"); - broker->encodeHeader(buffer, 'S', sequence); - buffer.putShortString(packageName); - buffer.putShortString(className); - buffer.putBin128(hash); - uint32_t length = 512 - buffer.available(); - buffer.reset(); - broker->connThreadBody.sendBuffer(buffer, length); -} - -void SessionManager::handleMethodResp(Broker* broker, Buffer& buffer, uint32_t sequence) -{ - if (broker->methodObject) { - broker->methodObject->handleMethodResp(buffer, sequence); - } -} - -void SessionManager::handleHeartbeatInd(Broker* /*broker*/, Buffer& /*inBuffer*/, uint32_t /*sequence*/) -{ -} - -void SessionManager::handleEventInd(Broker* broker, Buffer& buffer, uint32_t /*sequence*/) -{ - string packageName; - string className; - uint8_t hash[16]; - SchemaClass* schemaClass; - - buffer.getShortString(packageName); - buffer.getShortString(className); - buffer.getBin128(hash); - - { - Mutex::ScopedLock l(lock); - map<string, Package*>::iterator pIter = packages.find(packageName); - if (pIter == packages.end()) - return; - schemaClass = pIter->second->getClass(className, hash); - if (schemaClass == 0) - return; - } - - Event event(broker, schemaClass, buffer); - - if (listener) - listener->event(event); -} - -void SessionManager::handleSchemaResp(Broker* broker, Buffer& inBuffer, uint32_t sequence) -{ - uint8_t kind; - string packageName; - string className; - uint8_t hash[16]; - - kind = inBuffer.getOctet(); - inBuffer.getShortString(packageName); - inBuffer.getShortString(className); - inBuffer.getBin128(hash); - - { - Mutex::ScopedLock l(lock); - map<string, Package*>::iterator pIter = packages.find(packageName); - if (pIter != packages.end() && !pIter->second->getClass(className, hash)) { - ClassKey key(packageName, className, hash); - SchemaClass* schemaClass(new SchemaClass(kind, key, inBuffer)); - pIter->second->addClass(className, hash, schemaClass); - if (listener != 0) { - listener->newClass(schemaClass->getClassKey()); - } - } - } - - sequenceManager.release(sequence); - broker->decOutstanding(); -} - -void SessionManager::handleContentInd(Broker* broker, Buffer& buffer, uint32_t sequence, bool prop, bool stat) -{ - string packageName; - string className; - uint8_t hash[16]; - SchemaClass* schemaClass; - - buffer.getShortString(packageName); - buffer.getShortString(className); - buffer.getBin128(hash); - - { - Mutex::ScopedLock l(lock); - map<string, Package*>::iterator pIter = packages.find(packageName); - if (pIter == packages.end()) - return; - schemaClass = pIter->second->getClass(className, hash); - if (schemaClass == 0) - return; - } - - Object object(broker, schemaClass, buffer, prop, stat); - - if (prop && className == "agent" && packageName == "org.apache.qpid.broker") - broker->updateAgent(object); - - { - Mutex::ScopedLock l(lock); - if (syncSequenceList.count(sequence) == 1) { - if (!object.isDeleted()) - getResult.push_back(object); - return; - } - } - - if (listener) { - if (prop) - listener->objectProps(*broker, object); - if (stat) - listener->objectStats(*broker, object); - } -} - -void SessionManager::handleBrokerConnect(Broker* broker) -{ - if (listener != 0) - listener->brokerConnected(*broker); -} - -void SessionManager::handleBrokerDisconnect(Broker* broker) -{ - if (listener != 0) - listener->brokerDisconnected(*broker); -} - diff --git a/cpp/src/qpid/console/Value.cpp b/cpp/src/qpid/console/Value.cpp deleted file mode 100644 index 47c6a4ce57..0000000000 --- a/cpp/src/qpid/console/Value.cpp +++ /dev/null @@ -1,171 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ - -#include "qpid/console/Value.h" -#include "qpid/framing/Buffer.h" - -#include <sstream> - -using namespace qpid; -using namespace qpid::console; -using namespace std; - -string NullValue::str() const -{ - return "<Null>"; -} - -RefValue::RefValue(framing::Buffer& buffer) -{ - uint64_t first = buffer.getLongLong(); - uint64_t second = buffer.getLongLong(); - value.setValue(first, second); -} - -string RefValue::str() const -{ - stringstream s; - s << value; - return s.str(); -} - -string UintValue::str() const -{ - stringstream s; - s << value; - return s.str(); -} - -string IntValue::str() const -{ - stringstream s; - s << value; - return s.str(); -} - -string Uint64Value::str() const -{ - stringstream s; - s << value; - return s.str(); -} - -string Int64Value::str() const -{ - stringstream s; - s << value; - return s.str(); -} - -StringValue::StringValue(framing::Buffer& buffer, int tc) -{ - if (tc == 6) - buffer.getShortString(value); - else - buffer.getMediumString(value); -} - -string BoolValue::str() const -{ - return value ? "T" : "F"; -} - -string FloatValue::str() const -{ - stringstream s; - s << value; - return s.str(); -} - -string DoubleValue::str() const -{ - stringstream s; - s << value; - return s.str(); -} - -UuidValue::UuidValue(framing::Buffer& buffer) -{ - value.decode(buffer); -} - -string MapValue::str() const -{ - stringstream s; - s << value; - return s.str(); -} - -MapValue::MapValue(framing::Buffer& buffer) -{ - value.decode(buffer); -} - - -Value::Ptr ValueFactory::newValue(int typeCode, framing::Buffer& buffer) -{ - switch (typeCode) { - case 1: return Value::Ptr(new UintValue(buffer.getOctet())); // U8 - case 2: return Value::Ptr(new UintValue(buffer.getShort())); // U16 - case 3: return Value::Ptr(new UintValue(buffer.getLong())); // U32 - case 4: return Value::Ptr(new Uint64Value(buffer.getLongLong())); // U64 - case 6: return Value::Ptr(new StringValue(buffer, 6)); // SSTR - case 7: return Value::Ptr(new StringValue(buffer, 7)); // LSTR - case 8: return Value::Ptr(new Int64Value(buffer.getLongLong())); // ABSTIME - case 9: return Value::Ptr(new Uint64Value(buffer.getLongLong())); // DELTATIME - case 10: return Value::Ptr(new RefValue(buffer)); // REF - case 11: return Value::Ptr(new BoolValue(buffer.getOctet())); // BOOL - case 12: return Value::Ptr(new FloatValue(buffer.getFloat())); // FLOAT - case 13: return Value::Ptr(new DoubleValue(buffer.getDouble())); // DOUBLE - case 14: return Value::Ptr(new UuidValue(buffer)); // UUID - case 15: return Value::Ptr(new MapValue(buffer)); // MAP - case 16: return Value::Ptr(new IntValue(buffer.getOctet())); // S8 - case 17: return Value::Ptr(new IntValue(buffer.getShort())); // S16 - case 18: return Value::Ptr(new IntValue(buffer.getLong())); // S32 - case 19: return Value::Ptr(new Int64Value(buffer.getLongLong())); // S64 - } - - return Value::Ptr(); -} - -void ValueFactory::encodeValue(int typeCode, Value::Ptr value, framing::Buffer& buffer) -{ - switch (typeCode) { - case 1: buffer.putOctet(value->asUint()); return; // U8 - case 2: buffer.putShort(value->asUint()); return; // U16 - case 3: buffer.putLong(value->asUint()); return; // U32 - case 4: buffer.putLongLong(value->asUint64()); return; // U64 - case 6: buffer.putShortString(value->asString()); return; // SSTR - case 7: buffer.putMediumString(value->asString()); return; // LSTR - case 8: buffer.putLongLong(value->asInt64()); return; // ABSTIME - case 9: buffer.putLongLong(value->asUint64()); return; // DELTATIME - case 10: value->asObjectId().encode(buffer); return; // REF - case 11: buffer.putOctet(value->asBool() ? 1 : 0); return; // BOOL - case 12: buffer.putFloat(value->asFloat()); return; // FLOAT - case 13: buffer.putDouble(value->asDouble()); return; // DOUBLE - case 14: value->asUuid().encode(buffer); return; // UUID - case 15: value->asMap().encode(buffer); return; // MAP - case 16: buffer.putOctet(value->asInt()); return; // S8 - case 17: buffer.putShort(value->asInt()); return; // S16 - case 18: buffer.putLong(value->asInt()); return; // S32 - case 19: buffer.putLongLong(value->asInt64()); return; // S64 - } -} diff --git a/cpp/src/tests/CMakeLists.txt b/cpp/src/tests/CMakeLists.txt index 723754cfc7..646374d692 100644 --- a/cpp/src/tests/CMakeLists.txt +++ b/cpp/src/tests/CMakeLists.txt @@ -108,7 +108,6 @@ set(all_unit_tests ClientMessage ClientMessageTest ClientSessionTest - ConsoleTest DeliveryRecordTest DtxWorkRecordTest exception_test @@ -171,7 +170,7 @@ add_executable (unit_test unit_test ${actual_unit_tests} ${platform_test_additions}) target_link_libraries (unit_test ${qpid_test_boost_libs} - qpidmessaging qpidbroker qmfconsole) + qpidmessaging qpidbroker) set_target_properties (unit_test PROPERTIES COMPILE_DEFINITIONS _IN_QPID_BROKER) remember_location(unit_test) diff --git a/cpp/src/tests/ConsoleTest.cpp b/cpp/src/tests/ConsoleTest.cpp deleted file mode 100644 index 107472ed9e..0000000000 --- a/cpp/src/tests/ConsoleTest.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ - -#include "qpid/console/Package.h" -#include "qpid/console/ClassKey.h" -#include "unit_test.h" - -namespace qpid { -namespace tests { - -QPID_AUTO_TEST_SUITE(ConsoleTestSuite) - -using namespace qpid::framing; -using namespace qpid::console; - -QPID_AUTO_TEST_CASE(testClassKey) { - uint8_t hash[16] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; - ClassKey k("com.redhat.test", "class", hash); - - BOOST_CHECK_EQUAL(k.getPackageName(), "com.redhat.test"); - BOOST_CHECK_EQUAL(k.getClassName(), "class"); - BOOST_CHECK_EQUAL(k.getHashString(), "00010203-04050607-08090a0b-0c0d0e0f"); - BOOST_CHECK_EQUAL(k.str(), "com.redhat.test:class(00010203-04050607-08090a0b-0c0d0e0f)"); -} - -QPID_AUTO_TEST_SUITE_END() - -}} // namespace qpid::tests diff --git a/cpp/src/tests/ManagementTest.cpp b/cpp/src/tests/ManagementTest.cpp index 8944c084c0..98ef591fae 100644 --- a/cpp/src/tests/ManagementTest.cpp +++ b/cpp/src/tests/ManagementTest.cpp @@ -21,7 +21,6 @@ #include "qpid/management/ManagementObject.h" #include "qpid/framing/Buffer.h" -#include "qpid/console/ObjectId.h" #include "unit_test.h" namespace qpid { @@ -93,32 +92,6 @@ QPID_AUTO_TEST_CASE(testObjectIdCreate) { BOOST_CHECK_EQUAL(oid.getV2Key(), "an-object-name"); } -QPID_AUTO_TEST_CASE(testConsoleObjectId) { - qpid::console::ObjectId oid1, oid2; - - oid1.setValue(1, 2); - oid2.setValue(3, 4); - - BOOST_CHECK(oid1 < oid2); - BOOST_CHECK(oid1 <= oid2); - BOOST_CHECK(oid2 > oid1); - BOOST_CHECK(oid2 >= oid1); - BOOST_CHECK(oid1 != oid2); - BOOST_CHECK(oid1 == oid1); - - oid1.setValue(3, 6); - oid2.setValue(3, 4); - - BOOST_CHECK(oid1 > oid2); - BOOST_CHECK(oid1 >= oid2); - BOOST_CHECK(oid2 < oid1); - BOOST_CHECK(oid2 <= oid1); - BOOST_CHECK(oid1 != oid2); - - oid2.setValue(3, 6); - BOOST_CHECK(oid1 == oid2); -} - QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests |