client-cpp  0.10.0
kaa::ILogCollector Class Referenceabstract

The public interface to the Kaa log collecting subsystem. More...

#include <ILogCollector.hpp>

+ Inheritance diagram for kaa::ILogCollector:

Public Member Functions

virtual RecordFuture addLogRecord (const KaaUserLogRecord &record)=0
 Adds a new log record to the log storage. More...
 
virtual void setStorage (ILogStoragePtr storage)=0
 Sets the new log storage. More...
 
virtual void setUploadStrategy (ILogUploadStrategyPtr strategy)=0
 Sets the new log upload strategy. More...
 
virtual void setLogDeliveryListener (ILogDeliveryListenerPtr listener)=0
 Set a listener which receives a delivery status of each log bucket. More...
 
virtual ~ILogCollector ()
 

Detailed Description

The public interface to the Kaa log collecting subsystem.

The log collecting subsystem is based on two main components - a log storage and an upload strategy. Each time a new log record is added to the storage, the strategy decides whether the log upload is needed at the moment.

By default, MemoryLogStorage and DefaultLogUploadStrategy are used as the log storage and as the upload strategy respectively.

The subsystem also tracks whether the log delivery timeout is occurred. The timeout means the log delivery response isn't received in time, specified by ILogUploadStrategy::getTimeout(). The check is done in the lazy manner, on each the addLogRecord() call. If the timeout is occurred, the log upload strategy will be notified of it via the ILogUploadStrategy::onTimeout() callback.

Definition at line 54 of file ILogCollector.hpp.

Constructor & Destructor Documentation

virtual kaa::ILogCollector::~ILogCollector ( )
inlinevirtual

Definition at line 96 of file ILogCollector.hpp.

Member Function Documentation

virtual RecordFuture kaa::ILogCollector::addLogRecord ( const KaaUserLogRecord &  record)
pure virtual

Adds a new log record to the log storage.

To store log records, MemoryLogStorage is used by default. Use setStorage() to set your own implementation.

Parameters
[in]recordThe log record to be added.
See Also
KaaUserLogRecord
ILogStorage

Implemented in kaa::LogCollector.

virtual void kaa::ILogCollector::setLogDeliveryListener ( ILogDeliveryListenerPtr  listener)
pure virtual

Set a listener which receives a delivery status of each log bucket.

Implemented in kaa::LogCollector.

virtual void kaa::ILogCollector::setStorage ( ILogStoragePtr  storage)
pure virtual

Sets the new log storage.

MemoryLogStorage is used by default.

Parameters
[in]storageThe ILogStorage implementation.
Exceptions
KaaExceptionThe storage is NULL.

Implemented in kaa::LogCollector.

virtual void kaa::ILogCollector::setUploadStrategy ( ILogUploadStrategyPtr  strategy)
pure virtual

Sets the new log upload strategy.

DefaultLogUploadStrategy is used by default.

Parameters
[in]strategyThe ILogUploadStrategy implementation.
Exceptions
KaaExceptionThe strategy is NULL.

Implemented in kaa::LogCollector.


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