void updateConfiguration()

in activemq-cpp/src/main/activemq/core/ActiveMQConnectionFactory.cpp [147:235]


        void updateConfiguration(const URI& uri) {

            this->brokerURI = uri;
            this->properties->clear();

            if (uri.getQuery() != "") {
                // Not a composite URI so this works fine.
                try {
                    URISupport::parseQuery(uri.getQuery(), properties.get());
                } catch (URISyntaxException& ex) {
                }
            } else {
                // Composite URI won't indicate it has a query even if it does.
                try {
                    CompositeData composite = URISupport::parseComposite(uri);
                    *this->properties = composite.getParameters();
                } catch (URISyntaxException& ex) {
                }
            }

            // Check the connection options
            this->alwaysSyncSend = Boolean::parseBoolean(
                properties->getProperty(core::ActiveMQConstants::toString(
                    core::ActiveMQConstants::CONNECTION_ALWAYSSYNCSEND), Boolean::toString(alwaysSyncSend)));
            this->useAsyncSend = Boolean::parseBoolean(
                properties->getProperty(core::ActiveMQConstants::toString(
                    core::ActiveMQConstants::CONNECTION_USEASYNCSEND), Boolean::toString(useAsyncSend)));
            this->useCompression = Boolean::parseBoolean(
                properties->getProperty(core::ActiveMQConstants::toString(
                    core::ActiveMQConstants::CONNECTION_USECOMPRESSION), Boolean::toString(useCompression)));
            this->compressionLevel = Integer::parseInt(
                properties->getProperty("connection.compressionLevel", Integer::toString(compressionLevel)));
            this->messagePrioritySupported = Boolean::parseBoolean(
                properties->getProperty("connection.messagePrioritySupported", Boolean::toString(messagePrioritySupported)));
            this->checkForDuplicates = Boolean::parseBoolean(
                properties->getProperty("connection.checkForDuplicates", Boolean::toString(checkForDuplicates)));
            this->auditDepth = Integer::parseInt(
                properties->getProperty("connection.auditDepth", Integer::toString(auditDepth)));
            this->auditMaximumProducerNumber = Integer::parseInt(
                properties->getProperty("connection.auditMaximumProducerNumber", Integer::toString(auditMaximumProducerNumber)));
            this->dispatchAsync = Boolean::parseBoolean(
                properties->getProperty(core::ActiveMQConstants::toString(
                    core::ActiveMQConstants::CONNECTION_DISPATCHASYNC), Boolean::toString(dispatchAsync)));
            this->producerWindowSize = Integer::parseInt(
                properties->getProperty(core::ActiveMQConstants::toString(
                    core::ActiveMQConstants::CONNECTION_PRODUCERWINDOWSIZE), Integer::toString(producerWindowSize)));
            this->sendTimeout = decaf::lang::Integer::parseInt(
                properties->getProperty(core::ActiveMQConstants::toString(
                    core::ActiveMQConstants::CONNECTION_SENDTIMEOUT), Integer::toString(sendTimeout)));
            this->connectResponseTimeout = decaf::lang::Integer::parseInt(
                properties->getProperty(core::ActiveMQConstants::toString(
                    core::ActiveMQConstants::CONNECTION_CONNECTRESPONSETIMEOUT), Integer::toString(connectResponseTimeout)));
            this->closeTimeout = decaf::lang::Integer::parseInt(
                properties->getProperty(core::ActiveMQConstants::toString(
                    core::ActiveMQConstants::CONNECTION_CLOSETIMEOUT), Integer::toString(closeTimeout)));
            this->clientId = properties->getProperty(
                core::ActiveMQConstants::toString(core::ActiveMQConstants::PARAM_CLIENTID), clientId);
            this->username = properties->getProperty(
                core::ActiveMQConstants::toString(core::ActiveMQConstants::PARAM_USERNAME), username);
            this->password = properties->getProperty(
                core::ActiveMQConstants::toString(core::ActiveMQConstants::PARAM_PASSWORD), password);
            this->optimizeAcknowledge = Boolean::parseBoolean(
                properties->getProperty("connection.optimizeAcknowledge", Boolean::toString(optimizeAcknowledge)));
            this->exclusiveConsumer = Boolean::parseBoolean(
                properties->getProperty("connection.exclusiveConsumer", Boolean::toString(exclusiveConsumer)));
            this->transactedIndividualAck = Boolean::parseBoolean(
                properties->getProperty("connection.transactedIndividualAck", Boolean::toString(transactedIndividualAck)));
            this->useRetroactiveConsumer = Boolean::parseBoolean(
                properties->getProperty("connection.useRetroactiveConsumer", Boolean::toString(useRetroactiveConsumer)));
            this->sendAcksAsync = Boolean::parseBoolean(
                properties->getProperty("connection.sendAcksAsync", Boolean::toString(sendAcksAsync)));
            this->optimizeAcknowledgeTimeOut = Long::parseLong(
                properties->getProperty("connection.optimizeAcknowledgeTimeOut", Long::toString(optimizeAcknowledgeTimeOut)));
            this->optimizedAckScheduledAckInterval = Long::parseLong(
                properties->getProperty("connection.optimizedAckScheduledAckInterval", Long::toString(optimizedAckScheduledAckInterval)));
            this->consumerFailoverRedeliveryWaitPeriod = Long::parseLong(
                properties->getProperty("connection.consumerFailoverRedeliveryWaitPeriod", Long::toString(consumerFailoverRedeliveryWaitPeriod)));
            this->nonBlockingRedelivery = Boolean::parseBoolean(
                properties->getProperty("connection.nonBlockingRedelivery", Boolean::toString(nonBlockingRedelivery)));
            this->watchTopicAdvisories = Boolean::parseBoolean(
                properties->getProperty("connection.watchTopicAdvisories", Boolean::toString(watchTopicAdvisories)));
            this->alwaysSessionAsync = Boolean::parseBoolean(
                properties->getProperty("connection.alwaysSessionAsync", Boolean::toString(alwaysSessionAsync)));
            this->consumerExpiryCheckEnabled = Boolean::parseBoolean(
                properties->getProperty("connection.consumerExpiryCheckEnabled", Boolean::toString(consumerExpiryCheckEnabled)));

            this->defaultPrefetchPolicy->configure(*properties);
            this->defaultRedeliveryPolicy->configure(*properties);
        }