in activemq-cpp/src/main/activemq/commands/ConsumerInfo.cpp [109:198]
std::string ConsumerInfo::toString() const {
ostringstream stream;
stream << "ConsumerInfo { "
<< "commandId = " << this->getCommandId() << ", "
<< "responseRequired = " << boolalpha << this->isResponseRequired();
stream << ", ";
stream << "ConsumerId = ";
if (this->getConsumerId() != NULL) {
stream << this->getConsumerId()->toString();
} else {
stream << "NULL";
}
stream << ", ";
stream << "Browser = " << this->isBrowser();
stream << ", ";
stream << "Destination = ";
if (this->getDestination() != NULL) {
stream << this->getDestination()->toString();
} else {
stream << "NULL";
}
stream << ", ";
stream << "PrefetchSize = " << this->getPrefetchSize();
stream << ", ";
stream << "MaximumPendingMessageLimit = " << this->getMaximumPendingMessageLimit();
stream << ", ";
stream << "DispatchAsync = " << this->isDispatchAsync();
stream << ", ";
stream << "Selector = " << this->getSelector();
stream << ", ";
stream << "ClientId = " << this->getClientId();
stream << ", ";
stream << "SubscriptionName = " << this->getSubscriptionName();
stream << ", ";
stream << "NoLocal = " << this->isNoLocal();
stream << ", ";
stream << "Exclusive = " << this->isExclusive();
stream << ", ";
stream << "Retroactive = " << this->isRetroactive();
stream << ", ";
stream << "Priority = " << (int)this->getPriority();
stream << ", ";
stream << "BrokerPath = ";
if (this->getBrokerPath().size() > 0) {
stream << "[";
for (size_t ibrokerPath = 0; ibrokerPath < this->getBrokerPath().size(); ++ibrokerPath) {
if (this->getBrokerPath()[ibrokerPath] != NULL) {
stream << this->getBrokerPath()[ibrokerPath]->toString() << ", ";
} else {
stream << "NULL" << ", ";
}
}
stream << "]";
} else {
stream << "NULL";
}
stream << ", ";
stream << "AdditionalPredicate = ";
if (this->getAdditionalPredicate() != NULL) {
stream << this->getAdditionalPredicate()->toString();
} else {
stream << "NULL";
}
stream << ", ";
stream << "NetworkSubscription = " << this->isNetworkSubscription();
stream << ", ";
stream << "OptimizedAcknowledge = " << this->isOptimizedAcknowledge();
stream << ", ";
stream << "NoRangeAcks = " << this->isNoRangeAcks();
stream << ", ";
stream << "NetworkConsumerPath = ";
if (this->getNetworkConsumerPath().size() > 0) {
stream << "[";
for (size_t inetworkConsumerPath = 0; inetworkConsumerPath < this->getNetworkConsumerPath().size(); ++inetworkConsumerPath) {
if (this->getNetworkConsumerPath()[inetworkConsumerPath] != NULL) {
stream << this->getNetworkConsumerPath()[inetworkConsumerPath]->toString() << ", ";
} else {
stream << "NULL" << ", ";
}
}
stream << "]";
} else {
stream << "NULL";
}
stream << " }";
return stream.str();
}