18 #ifndef _ACTIVEMQ_CMSUTIL_CMSTEMPLATE_H_
19 #define _ACTIVEMQ_CMSUTIL_CMSTEMPLATE_H_
108 :
SessionCallback(), action(action), parent(parent), destination(destination) {
128 std::string destinationName;
139 const std::string& destinationName)
174 parent->doSend(session, producer, messageCreator);
200 const std::string& selector,
bool noLocal) :
201 SessionCallback(), destination(destination), selector(selector), noLocal(noLocal), message(
NULL), parent(parent) {
225 std::string destinationName;
235 bool noLocal,
const std::string& destinationName) :
254 std::string defaultDestinationName;
256 bool messageIdEnabled;
258 bool messageTimestampEnabled;
262 long long receiveTimeout;
264 bool explicitQosEnabled;
270 long long timeToLive;
296 this->defaultDestination = defaultDestination;
304 return this->defaultDestination;
312 return this->defaultDestination;
325 if (defaultDestinationName != this->defaultDestinationName) {
326 this->defaultDestination =
NULL;
327 this->defaultDestinationName = defaultDestinationName;
339 return this->defaultDestinationName;
350 if (pubSubDomain != isPubSubDomain()) {
351 this->defaultDestination =
NULL;
357 this->messageIdEnabled = messageIdEnabled;
361 return this->messageIdEnabled;
365 this->messageTimestampEnabled = messageTimestampEnabled;
369 return this->messageTimestampEnabled;
373 this->noLocal = noLocal;
377 return this->noLocal;
381 this->receiveTimeout = receiveTimeout;
385 return this->receiveTimeout;
397 this->explicitQosEnabled = explicitQosEnabled;
413 return this->explicitQosEnabled;
425 this->deliveryMode = (deliveryPersistent ? 0 : 1);
437 this->deliveryMode = deliveryMode;
444 return this->deliveryMode;
455 this->priority = priority;
462 return this->priority;
474 this->timeToLive = timeToLive;
481 return this->timeToLive;
526 virtual void execute(
const std::string& destinationName,
ProducerCallback* action);
557 virtual void send(
const std::string& destinationName,
MessageCreator* messageCreator);
583 virtual cms::Message* receive(
const std::string& destinationName);
594 virtual cms::Message* receiveSelected(
const std::string& selector);
621 virtual cms::Message* receiveSelected(
const std::string& destinationName,
const std::string& selector);
639 void createSessionPools();
644 void destroySessionPools();
652 void checkDefaultDestination();
711 const std::string& selector,
bool noLocal);