00001 /* 00002 * Licensed to the Apache Software Foundation (ASF) under one or more 00003 * contributor license agreements. See the NOTICE file distributed with 00004 * this work for additional information regarding copyright ownership. 00005 * The ASF licenses this file to You under the Apache License, Version 2.0 00006 * (the "License"); you may not use this file except in compliance with 00007 * the License. You may obtain a copy of the License at 00008 * 00009 * http://www.apache.org/licenses/LICENSE-2.0 00010 * 00011 * Unless required by applicable law or agreed to in writing, software 00012 * distributed under the License is distributed on an "AS IS" BASIS, 00013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00014 * See the License for the specific language governing permissions and 00015 * limitations under the License. 00016 */ 00017 00018 #ifndef _ACTIVEMQ_UTIL_ADVISORYSUPPORT_H_ 00019 #define _ACTIVEMQ_UTIL_ADVISORYSUPPORT_H_ 00020 00021 #include <activemq/util/Config.h> 00022 00023 #include <string> 00024 #include <vector> 00025 00026 namespace cms { 00027 class Destination; 00028 } 00029 namespace activemq { 00030 namespace commands { 00031 class ActiveMQDestination; 00032 } 00033 namespace util { 00034 00041 class AMQCPP_API AdvisorySupport { 00042 private: 00043 00044 AdvisorySupport(); 00045 00046 public: 00047 00048 static const std::string ADVISORY_TOPIC_PREFIX; 00049 static const std::string PRODUCER_ADVISORY_TOPIC_PREFIX; 00050 static const std::string QUEUE_PRODUCER_ADVISORY_TOPIC_PREFIX; 00051 static const std::string TOPIC_PRODUCER_ADVISORY_TOPIC_PREFIX; 00052 static const std::string CONSUMER_ADVISORY_TOPIC_PREFIX; 00053 static const std::string QUEUE_CONSUMER_ADVISORY_TOPIC_PREFIX; 00054 static const std::string TOPIC_CONSUMER_ADVISORY_TOPIC_PREFIX; 00055 static const std::string EXPIRED_TOPIC_MESSAGES_TOPIC_PREFIX; 00056 static const std::string EXPIRED_QUEUE_MESSAGES_TOPIC_PREFIX; 00057 static const std::string NO_TOPIC_CONSUMERS_TOPIC_PREFIX; 00058 static const std::string NO_QUEUE_CONSUMERS_TOPIC_PREFIX; 00059 static const std::string SLOW_CONSUMER_TOPIC_PREFIX; 00060 static const std::string FAST_PRODUCER_TOPIC_PREFIX; 00061 static const std::string MESSAGE_DISCAREDED_TOPIC_PREFIX; 00062 static const std::string FULL_TOPIC_PREFIX; 00063 static const std::string MESSAGE_DELIVERED_TOPIC_PREFIX; 00064 static const std::string MESSAGE_CONSUMED_TOPIC_PREFIX; 00065 static const std::string MESSAGE_DLQ_TOPIC_PREFIX; 00066 static const std::string MASTER_BROKER_TOPIC_PREFIX; 00067 static const std::string NETWORK_BRIDGE_TOPIC_PREFIX; 00068 static const std::string AGENT_TOPIC; 00069 static const std::string ADIVSORY_MESSAGE_TYPE; 00070 static const std::string MSG_PROPERTY_ORIGIN_BROKER_ID; 00071 static const std::string MSG_PROPERTY_ORIGIN_BROKER_NAME; 00072 static const std::string MSG_PROPERTY_ORIGIN_BROKER_URL; 00073 static const std::string MSG_PROPERTY_USAGE_NAME; 00074 static const std::string MSG_PROPERTY_CONSUMER_ID; 00075 static const std::string MSG_PROPERTY_PRODUCER_ID; 00076 static const std::string MSG_PROPERTY_MESSAGE_ID; 00077 static const std::string MSG_PROPERTY_CONSUMER_COUNT; 00078 static const std::string MSG_PROPERTY_DISCARDED_COUNT; 00079 00080 public: 00081 00082 ~AdvisorySupport(); 00083 00084 public: 00085 00092 static commands::ActiveMQDestination* getTempDestinationCompositeAdvisoryTopic(); 00093 00100 static commands::ActiveMQDestination* getAllDestinationsCompositeAdvisoryTopic(); 00101 00108 static std::vector<commands::ActiveMQDestination*> getAllDestinationAdvisoryTopics(const cms::Destination* destination); 00109 00116 static std::vector<commands::ActiveMQDestination*> getAllDestinationAdvisoryTopics(const commands::ActiveMQDestination* destination); 00117 00123 static commands::ActiveMQDestination* getConnectionAdvisoryTopic(); 00124 00130 static commands::ActiveMQDestination* getQueueAdvisoryTopic(); 00131 00137 static commands::ActiveMQDestination* getTopicAdvisoryTopic(); 00138 00144 static commands::ActiveMQDestination* getTempQueueAdvisoryTopic(); 00145 00151 static commands::ActiveMQDestination* getTempTopicAdvisoryTopic(); 00152 00158 static commands::ActiveMQDestination* getConsumerAdvisoryTopic(const cms::Destination* destination); 00159 00165 static commands::ActiveMQDestination* getConsumerAdvisoryTopic(const commands::ActiveMQDestination* destination); 00166 00172 static commands::ActiveMQDestination* getProducerAdvisoryTopic(const cms::Destination* destination); 00173 00179 static commands::ActiveMQDestination* getProducerAdvisoryTopic(const commands::ActiveMQDestination* destination); 00180 00187 static commands::ActiveMQDestination* getExpiredMessageTopic(const cms::Destination* destination); 00188 00195 static commands::ActiveMQDestination* getExpiredMessageTopic(const commands::ActiveMQDestination* destination); 00196 00203 static commands::ActiveMQDestination* getExpiredTopicMessageAdvisoryTopic(const cms::Destination* destination); 00204 00211 static commands::ActiveMQDestination* getExpiredTopicMessageAdvisoryTopic(const commands::ActiveMQDestination* destination); 00212 00219 static commands::ActiveMQDestination* getExpiredQueueMessageAdvisoryTopic(const cms::Destination* destination); 00220 00227 static commands::ActiveMQDestination* getExpiredQueueMessageAdvisoryTopic(const commands::ActiveMQDestination* destination); 00228 00235 static commands::ActiveMQDestination* getNoConsumersAdvisoryTopic(const cms::Destination* destination); 00236 00243 static commands::ActiveMQDestination* getNoConsumersAdvisoryTopic(const commands::ActiveMQDestination* destination); 00244 00251 static commands::ActiveMQDestination* getNoTopicConsumersAdvisoryTopic(const cms::Destination* destination); 00252 00259 static commands::ActiveMQDestination* getNoTopicConsumersAdvisoryTopic(const commands::ActiveMQDestination* destination); 00260 00267 static commands::ActiveMQDestination* getNoQueueConsumersAdvisoryTopic(const cms::Destination* destination); 00268 00275 static commands::ActiveMQDestination* getNoQueueConsumersAdvisoryTopic(const commands::ActiveMQDestination* destination); 00276 00283 static commands::ActiveMQDestination* getSlowConsumerAdvisoryTopic(const cms::Destination* destination); 00284 00291 static commands::ActiveMQDestination* getSlowConsumerAdvisoryTopic(const commands::ActiveMQDestination* destination); 00292 00299 static commands::ActiveMQDestination* getFastProducerAdvisoryTopic(const cms::Destination* destination); 00300 00307 static commands::ActiveMQDestination* getFastProducerAdvisoryTopic(const commands::ActiveMQDestination* destination); 00308 00315 static commands::ActiveMQDestination* getMessageDiscardedAdvisoryTopic(const cms::Destination* destination); 00316 00323 static commands::ActiveMQDestination* getMessageDiscardedAdvisoryTopic(const commands::ActiveMQDestination* destination); 00324 00331 static commands::ActiveMQDestination* getMessageDeliveredAdvisoryTopic(const cms::Destination* destination); 00332 00339 static commands::ActiveMQDestination* getMessageDeliveredAdvisoryTopic(const commands::ActiveMQDestination* destination); 00340 00347 static commands::ActiveMQDestination* getMessageConsumedAdvisoryTopic(const cms::Destination* destination); 00348 00355 static commands::ActiveMQDestination* getMessageConsumedAdvisoryTopic(const commands::ActiveMQDestination* destination); 00356 00363 static commands::ActiveMQDestination* getMessageDLQdAdvisoryTopic(const cms::Destination* destination); 00364 00371 static commands::ActiveMQDestination* getMessageDLQdAdvisoryTopic(const commands::ActiveMQDestination* destination); 00372 00378 static commands::ActiveMQDestination* getMasterBrokerAdvisoryTopic(); 00379 00385 static commands::ActiveMQDestination* getNetworkBridgeAdvisoryTopic(); 00386 00393 static commands::ActiveMQDestination* getFullAdvisoryTopic(const cms::Destination* destination); 00394 00401 static commands::ActiveMQDestination* getFullAdvisoryTopic(const commands::ActiveMQDestination* destination); 00402 00409 static commands::ActiveMQDestination* getDestinationAdvisoryTopic(const cms::Destination* destination); 00410 00417 static commands::ActiveMQDestination* getDestinationAdvisoryTopic(const commands::ActiveMQDestination* destination); 00418 00419 public: 00420 00424 static bool isDestinationAdvisoryTopic(const cms::Destination* destination); 00425 00429 static bool isDestinationAdvisoryTopic(const commands::ActiveMQDestination* destination); 00430 00434 static bool isTempDestinationAdvisoryTopic(const cms::Destination* destination); 00435 00439 static bool isTempDestinationAdvisoryTopic(const commands::ActiveMQDestination* destination); 00440 00444 static bool isAdvisoryTopic(const cms::Destination* destination); 00445 00449 static bool isAdvisoryTopic(const commands::ActiveMQDestination* destination); 00450 00454 static bool isConnectionAdvisoryTopic(const cms::Destination* destination); 00455 00459 static bool isConnectionAdvisoryTopic(const commands::ActiveMQDestination* destination); 00460 00464 static bool isProducerAdvisoryTopic(const cms::Destination* destination); 00465 00469 static bool isProducerAdvisoryTopic(const commands::ActiveMQDestination* destination); 00470 00474 static bool isConsumerAdvisoryTopic(const cms::Destination* destination); 00475 00479 static bool isConsumerAdvisoryTopic(const commands::ActiveMQDestination* destination); 00480 00484 static bool isSlowConsumerAdvisoryTopic(const cms::Destination* destination); 00485 00489 static bool isSlowConsumerAdvisoryTopic(const commands::ActiveMQDestination* destination); 00490 00494 static bool isFastProducerAdvisoryTopic(const cms::Destination* destination); 00495 00499 static bool isFastProducerAdvisoryTopic(const commands::ActiveMQDestination* destination); 00500 00504 static bool isMessageConsumedAdvisoryTopic(const cms::Destination* destination); 00505 00509 static bool isMessageConsumedAdvisoryTopic(const commands::ActiveMQDestination* destination); 00510 00514 static bool isMasterBrokerAdvisoryTopic(const cms::Destination* destination); 00515 00519 static bool isMasterBrokerAdvisoryTopic(const commands::ActiveMQDestination* destination); 00520 00524 static bool isMessageDeliveredAdvisoryTopic(const cms::Destination* destination); 00525 00529 static bool isMessageDeliveredAdvisoryTopic(const commands::ActiveMQDestination* destination); 00530 00534 static bool isMessageDiscardedAdvisoryTopic(const cms::Destination* destination); 00535 00539 static bool isMessageDiscardedAdvisoryTopic(const commands::ActiveMQDestination* destination); 00540 00544 static bool isMessageDLQdAdvisoryTopic(const cms::Destination* destination); 00545 00549 static bool isMessageDLQdAdvisoryTopic(const commands::ActiveMQDestination* destination); 00550 00554 static bool isFullAdvisoryTopic(const cms::Destination* destination); 00555 00559 static bool isFullAdvisoryTopic(const commands::ActiveMQDestination* destination); 00560 00564 static bool isNetworkBridgeAdvisoryTopic(const cms::Destination* destination); 00565 00569 static bool isNetworkBridgeAdvisoryTopic(const commands::ActiveMQDestination* destination); 00570 00571 }; 00572 00573 }} 00574 00575 #endif /* _ACTIVEMQ_UTIL_ADVISORYSUPPORT_H_ */
1.6.1