client-cpp  0.10.0
kaa::LogCollector Class Reference

#include <LogCollector.hpp>

+ Inheritance diagram for kaa::LogCollector:
+ Collaboration diagram for kaa::LogCollector:

Public Member Functions

 LogCollector (IKaaChannelManagerPtr manager, IKaaClientContext &context)
 
virtual RecordFuture addLogRecord (const KaaUserLogRecord &record)
 Adds a new log record to the log storage. More...
 
virtual void setStorage (ILogStoragePtr storage)
 Sets the new log storage. More...
 
virtual void setUploadStrategy (ILogUploadStrategyPtr strategy)
 Sets the new log upload strategy. More...
 
virtual void setLogDeliveryListener (ILogDeliveryListenerPtr listener)
 Set a listener which receives a delivery status of each log bucket. More...
 
virtual std::shared_ptr
< LogSyncRequest > 
getLogUploadRequest ()
 
virtual void onLogUploadResponse (const LogSyncResponse &response, std::size_t deliveryTime)
 
void setTransport (LoggingTransport *transport)
 
- Public Member Functions inherited from kaa::ILogCollector
virtual ~ILogCollector ()
 
- Public Member Functions inherited from kaa::ILogProcessor
virtual ~ILogProcessor ()
 
- Public Member Functions inherited from kaa::ILogFailoverCommand
virtual ~ILogFailoverCommand ()
 
- Public Member Functions inherited from kaa::IAccessPointCommand
virtual ~IAccessPointCommand ()
 

Detailed Description

Default ILogCollector implementation.

Definition at line 68 of file LogCollector.hpp.

Constructor & Destructor Documentation

kaa::LogCollector::LogCollector ( IKaaChannelManagerPtr  manager,
IKaaClientContext context 
)

Member Function Documentation

virtual RecordFuture kaa::LogCollector::addLogRecord ( const KaaUserLogRecord &  record)
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

Implements kaa::ILogCollector.

virtual std::shared_ptr<LogSyncRequest> kaa::LogCollector::getLogUploadRequest ( )
virtual

Implements kaa::ILogProcessor.

virtual void kaa::LogCollector::onLogUploadResponse ( const LogSyncResponse &  response,
std::size_t  deliveryTime 
)
virtual

Called when log upload response arrived.

Parameters
responseResponse from operations service.
deliveryTimeThe time point the log was delivered at.

Implements kaa::ILogProcessor.

virtual void kaa::LogCollector::setLogDeliveryListener ( ILogDeliveryListenerPtr  listener)
inlinevirtual

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

Implements kaa::ILogCollector.

Definition at line 77 of file LogCollector.hpp.

virtual void kaa::LogCollector::setStorage ( ILogStoragePtr  storage)
virtual

Sets the new log storage.

MemoryLogStorage is used by default.

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

Implements kaa::ILogCollector.

void kaa::LogCollector::setTransport ( LoggingTransport transport)
inline

Definition at line 84 of file LogCollector.hpp.

virtual void kaa::LogCollector::setUploadStrategy ( ILogUploadStrategyPtr  strategy)
virtual

Sets the new log upload strategy.

DefaultLogUploadStrategy is used by default.

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

Implements kaa::ILogCollector.


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