public class DefaultLogCollector extends Object implements LogCollector, LogProcessor
Constructor and Description |
---|
DefaultLogCollector(LogTransport transport) |
Modifier and Type | Method and Description |
---|---|
void |
addLogRecord(SuperRecord record)
Adds new log record to local storage.
|
void |
fillSyncRequest(org.kaaproject.kaa.common.endpoint.gen.LogSyncRequest request)
Fills the given request with the latest Logging state.
|
void |
onLogResponse(org.kaaproject.kaa.common.endpoint.gen.LogSyncResponse response)
Updates the state using response from the server.
|
void |
setConfiguration(LogUploadConfiguration configuration)
Set user implementation of a log upload configuration.
|
void |
setStorage(LogStorage storage)
Set user implementation of a log storage.
|
void |
setStorageStatus(LogStorageStatus status)
Set user implementation of a log storage status.
|
void |
setUploadStrategy(LogUploadStrategy strategy)
Set user implementation of a log upload strategy.
|
public DefaultLogCollector(LogTransport transport)
public void addLogRecord(SuperRecord record) throws IOException
LogCollector
addLogRecord
in interface LogCollector
record
- New log record objectIOException
public void setUploadStrategy(LogUploadStrategy strategy)
LogCollector
setUploadStrategy
in interface LogCollector
strategy
- User-defined log upload strategy object.public void setStorage(LogStorage storage)
LogCollector
setStorage
in interface LogCollector
storage
- User-defined log storage objectpublic void setStorageStatus(LogStorageStatus status)
LogCollector
setStorageStatus
in interface LogCollector
status
- User-defined log storage status objectpublic void setConfiguration(LogUploadConfiguration configuration)
LogCollector
setConfiguration
in interface LogCollector
configuration
- User-defined log upload configuration object.public void fillSyncRequest(org.kaaproject.kaa.common.endpoint.gen.LogSyncRequest request)
LogProcessor
fillSyncRequest
in interface LogProcessor
request
- the Log request which is going to be filled.public void onLogResponse(org.kaaproject.kaa.common.endpoint.gen.LogSyncResponse response) throws IOException
LogProcessor
onLogResponse
in interface LogProcessor
response
- the response from the remote server.IOException
Copyright © 2014. All rights reserved.