PreEmptive Analytics .NET API  1.3
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
Public Member Functions | Protected Member Functions | Protected Attributes | Properties | List of all members
PreEmptive.Analytics.Common.MessageQueueProcessor Class Reference

Class for managing the message queue. More...

Inherits PreEmptive.Analytics.Common.IQueueProcessor.

Inherited by PreEmptive.Analytics.Common.OfflineStorageThread, and PreEmptive.Analytics.Common.TransmitterThread.

Public Member Functions

void ProcessQueue ()
 Signals that the queue processor should immediately stop waiting and process the queue If the queue is in the middle of being processed, then it will be processed once more afterwards with no delay If the queue is not yet running, it is processed on the current thread(ie, it blocks) More...
 
void ProcessQueueBatches ()
 Creates and sends a message batch based on what messages have been queued. More...
 
virtual void Start ()
 Begins the automatic processing of the message queue. (not blocking, creates it's own thread) More...
 
void Stop ()
 Halts the automatic processing of the message queue. More...
 
void ProcessQueueNow ()
 Processes the queue if the message queue processor is currently running. More...
 
virtual void ProcessBatch (MessageBatch batch)
 Processes a MessageBatch object. More...
 
virtual MessageBatch GetMessageBatch ()
 Creates a message batch from informatino provided by the MessageQueueProcessor. More...
 

Protected Member Functions

 MessageQueueProcessor (IFlowController flowController, ILogger logger, IAsyncProvider asyncprovider)
 Constructor for the MessageQueueProcessor. More...
 

Protected Attributes

IFlowController flowController
 IFlowController that determines the behavior of the MessageQueueProcessor. More...
 
ILogger logger
 The Logger instance available for debug and error messages More...
 
IAsyncProvider AsyncProvider
 The asynchronous mechanism provider More...
 

Properties

bool Running [get, set]
 If the MessageQueueProcessor is currently running. More...
 
- Properties inherited from PreEmptive.Analytics.Common.IQueueProcessor
bool Running [get, set]
 If the MessageQueueProcessor is currently running. More...
 

Detailed Description

Class for managing the message queue.

Constructor & Destructor Documentation

PreEmptive.Analytics.Common.MessageQueueProcessor.MessageQueueProcessor ( IFlowController  flowController,
ILogger  logger,
IAsyncProvider  asyncprovider 
)
protected

Constructor for the MessageQueueProcessor.

Parameters
flowControllerIFlowController that determines the behavior of the MessageQueueProcessor.
loggerAn ILogger instance for reporting information about the message queue processor.
asyncproviderThe provider of the asynchronous execution functionality

Member Function Documentation

virtual MessageBatch PreEmptive.Analytics.Common.MessageQueueProcessor.GetMessageBatch ( )
virtual

Creates a message batch from informatino provided by the MessageQueueProcessor.

Returns
The new MessageBatch object.

Reimplemented in PreEmptive.Analytics.Common.TransmitterThread, and PreEmptive.Analytics.Common.OfflineStorageThread.

virtual void PreEmptive.Analytics.Common.MessageQueueProcessor.ProcessBatch ( MessageBatch  batch)
virtual

Processes a MessageBatch object.

Parameters
batchThe MessageBatch object to process.

Reimplemented in PreEmptive.Analytics.Common.TransmitterThread, and PreEmptive.Analytics.Common.OfflineStorageThread.

void PreEmptive.Analytics.Common.MessageQueueProcessor.ProcessQueue ( )

Signals that the queue processor should immediately stop waiting and process the queue If the queue is in the middle of being processed, then it will be processed once more afterwards with no delay If the queue is not yet running, it is processed on the current thread(ie, it blocks)

void PreEmptive.Analytics.Common.MessageQueueProcessor.ProcessQueueBatches ( )

Creates and sends a message batch based on what messages have been queued.

void PreEmptive.Analytics.Common.MessageQueueProcessor.ProcessQueueNow ( )

Processes the queue if the message queue processor is currently running.

Implements PreEmptive.Analytics.Common.IQueueProcessor.

virtual void PreEmptive.Analytics.Common.MessageQueueProcessor.Start ( )
virtual

Begins the automatic processing of the message queue. (not blocking, creates it's own thread)

Implements PreEmptive.Analytics.Common.IQueueProcessor.

Reimplemented in PreEmptive.Analytics.Common.TransmitterThread.

void PreEmptive.Analytics.Common.MessageQueueProcessor.Stop ( )

Halts the automatic processing of the message queue.

Implements PreEmptive.Analytics.Common.IQueueProcessor.

Member Data Documentation

IAsyncProvider PreEmptive.Analytics.Common.MessageQueueProcessor.AsyncProvider
protected

The asynchronous mechanism provider

IFlowController PreEmptive.Analytics.Common.MessageQueueProcessor.flowController
protected

IFlowController that determines the behavior of the MessageQueueProcessor.

ILogger PreEmptive.Analytics.Common.MessageQueueProcessor.logger
protected

The Logger instance available for debug and error messages

Property Documentation

bool PreEmptive.Analytics.Common.MessageQueueProcessor.Running
getset

If the MessageQueueProcessor is currently running.


The documentation for this class was generated from the following file: