18 #ifndef _ACTIVEMQ_CORE_KERNELS_ACTIVEMQSESSIONKERNEL_H_ 19 #define _ACTIVEMQ_CORE_KERNELS_ACTIVEMQSESSIONKERNEL_H_ 53 class ActiveMQConnection;
54 class ActiveMQConsumer;
55 class ActiveMQProducer;
56 class ActiveMQSessionExecutor;
98 std::auto_ptr<ActiveMQSessionExecutor>
executor;
148 virtual void start();
159 bool isStarted()
const;
192 virtual void close();
194 virtual void commit();
196 virtual void rollback();
198 virtual void recover();
203 const std::string& selector);
206 const std::string& selector,
210 const std::string& name,
211 const std::string& selector,
212 bool noLocal =
false);
220 virtual cms::Queue* createQueue(
const std::string& queueName);
222 virtual cms::Topic* createTopic(
const std::string& topicName);
232 virtual cms::BytesMessage* createBytesMessage(
const unsigned char* bytes,
int bytesSize);
244 virtual bool isTransacted()
const;
246 virtual void unsubscribe(
const std::string& name);
278 cms::Message* message,
int deliveryMode,
int priority,
long long timeToLive,
314 return *( this->sessionInfo );
324 return *( this->sessionInfo->getSessionId() );
331 return this->connection;
345 return this->lastDeliveredSequenceId;
355 this->lastDeliveredSequenceId = value;
438 virtual void doStartTransaction();
446 return this->transaction;
544 bool iterateConsumers();
551 void checkMessageListener()
const;
558 virtual int getHashCode()
const;
577 long long getNextProducerSequenceId() {
582 void checkClosed()
const;
597 std::string createTemporaryDestinationName();
virtual void close()
Terminates the dispatching thread.
Definition: ActiveMQSessionExecutor.h:120
An interface encapsulating a provider-specific topic name.
Definition: Topic.h:36
With this acknowledgment mode, the session automatically acknowledges a client's receipt of a message...
Definition: Session.h:128
Definition: ActiveMQTempDestination.h:34
virtual void stop()
Stops dispatching.
virtual bool isIndividualAcknowledge() const
Definition: ActiveMQSessionKernel.h:173
Root of all messages.
Definition: Message.h:88
Defines a Temporary Topic based Destination.
Definition: TemporaryTopic.h:39
A Destination object encapsulates a provider-specific address.
Definition: Destination.h:39
#define AMQCPP_API
Definition: Config.h:30
virtual bool isClientAcknowledge() const
Definition: ActiveMQSessionKernel.h:169
AcknowledgeMode
Definition: Session.h:108
Asynchronous event interface for CMS asynchronous operations.
Definition: AsyncCallback.h:37
std::auto_ptr< ActiveMQSessionExecutor > executor
Sends incoming messages to the registered consumers.
Definition: ActiveMQSessionKernel.h:98
With this acknowledgment mode, the session automatically acknowledges a client's receipt of a message...
Definition: Session.h:117
Definition: SessionInfo.h:48
This class implements in interface for browsing the messages in a Queue without removing them...
Definition: QueueBrowser.h:53
If a CMS provider detects a serious problem, it notifies the client application through an ExceptionL...
Definition: ExceptionListener.h:37
virtual void start()
Starts the dispatching.
cms::Session::AcknowledgeMode ackMode
This Sessions Acknowledgment mode.
Definition: ActiveMQSessionKernel.h:103
virtual bool isDupsOkAcknowledge() const
Definition: ActiveMQSessionKernel.h:165
A BytesMessage object is used to send a message containing a stream of unsigned bytes.
Definition: BytesMessage.h:66
ActiveMQConnection * getConnection() const
Gets the ActiveMQConnection that is associated with this session.
Definition: ActiveMQSessionKernel.h:330
Pointer< ActiveMQTransactionContext > getTransactionContext()
Gets the Pointer to this Session's TransactionContext.
Definition: ActiveMQSessionKernel.h:445
virtual void wakeup()
wakeup this executer and dispatch any pending messages.
util::LongSequenceGenerator consumerIds
Next available Consumer Id.
Definition: ActiveMQSessionKernel.h:118
util::LongSequenceGenerator producerSequenceIds
Next available Producer Sequence Id.
Definition: ActiveMQSessionKernel.h:113
util::LongSequenceGenerator producerIds
Next available Producer Id.
Definition: ActiveMQSessionKernel.h:108
Defines a Temporary Queue based Destination.
Definition: TemporaryQueue.h:39
A Session object is a single-threaded context for producing and consuming messages.
Definition: Session.h:105
long long getLastDeliveredSequenceId() const
Gets the currently set Last Delivered Sequence Id.
Definition: ActiveMQSessionKernel.h:344
Delegate dispatcher for a single session.
Definition: ActiveMQSessionExecutor.h:44
const commands::SessionInfo & getSessionInfo() const
Gets the Session Information object for this session, if the session is closed than this method throw...
Definition: ActiveMQSessionKernel.h:312
Definition: ActiveMQProducerKernel.h:44
Message will be acknowledged individually.
Definition: Session.h:146
With this acknowledgment mode, the client acknowledges a consumed message by calling the message's ac...
Definition: Session.h:134
A MapMessage object is used to send a set of name-value pairs.
Definition: MapMessage.h:71
long long getNextSequenceId()
Definition: MemoryUsage.h:28
Interface for a StreamMessage.
Definition: StreamMessage.h:61
A boolean value that may be updated atomically.
Definition: AtomicBoolean.h:34
virtual bool isAutoAcknowledge() const
Definition: ActiveMQSessionKernel.h:161
virtual void clearMessagesInProgress()
Removes all messages in the Dispatch Channel so that non are delivered.
Definition: ActiveMQSessionExecutor.h:90
Definition: ActiveMQException.h:35
Pointer< commands::SessionInfo > sessionInfo
SessionInfo for this Session.
Definition: ActiveMQSessionKernel.h:77
void setLastDeliveredSequenceId(long long value)
Sets the value of the Last Delivered Sequence Id.
Definition: ActiveMQSessionKernel.h:354
AtomicBoolean closed
Indicates that this connection has been closed, it is no longer usable after this becomes true...
Definition: ActiveMQSessionKernel.h:93
A client uses a MessageProducer object to send messages to a Destination.
Definition: MessageProducer.h:60
This class is used to generate a sequence of long long values that are incremented each time a new va...
Definition: LongSequenceGenerator.h:32
A client uses a MessageConsumer to received messages from a destination.
Definition: MessageConsumer.h:63
long long lastDeliveredSequenceId
Last Delivered Sequence Id.
Definition: ActiveMQSessionKernel.h:123
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements...
Definition: CachedConsumer.h:24
Definition: SessionId.h:51
Java-like properties class for mapping string names to string values.
Definition: Properties.h:53
Definition: ActiveMQSessionKernel.h:65
Interface for an object responsible for dispatching messages to consumers.
Definition: Dispatcher.h:32
Definition: MessageDispatchChannel.h:34
Decaf's implementation of a Smart Pointer that is a template on a Type and is Thread Safe if the defa...
Definition: Pointer.h:53
Concrete connection used for all connectors to the ActiveMQ broker.
Definition: ActiveMQConnection.h:60
SessionConfig * config
Definition: ActiveMQSessionKernel.h:72
Interface for a text message.
Definition: TextMessage.h:41
ActiveMQConnection * connection
Connection.
Definition: ActiveMQSessionKernel.h:87
const commands::SessionId & getSessionId() const
Gets the Session Id object for this session, if the session is closed than this method throws an exce...
Definition: ActiveMQSessionKernel.h:322
An interface encapsulating a provider-specific queue name.
Definition: Queue.h:37
Pointer< ActiveMQTransactionContext > transaction
Transaction Management object.
Definition: ActiveMQSessionKernel.h:82