public abstract class HBBaseDataCollector extends Object
This class is to be extended by HeartBeat data collectors.
Every new collector needs to provide details of the data it collects. As an example use one
of the existing collectors AuthoritiesDataCollector, ConfigurationDataCollector,
InfoDataCollector, ModelUsageDataCollector, SystemUsageDataCollector.
Each collector provides a reference to a HeartBeatJobScheduler which
is then used by the HBDataCollectorService to schedule and unschedule jobs for this collector.
| Constructor and Description |
|---|
HBBaseDataCollector(String collectorId,
String collectorVersion,
String cronExpression,
HeartBeatJobScheduler hbJobScheduler) |
| Modifier and Type | Method and Description |
|---|---|
abstract List<org.alfresco.heartbeat.datasender.HBData> |
collectData()
This method returns data to be collected.
|
void |
deregister()
This method is called by Spring at initialisation and will deregister this collector with the provided
HBDataCollectorService |
String |
getCollectorId() |
String |
getCollectorVersion() |
String |
getCronExpression() |
HeartBeatJobScheduler |
getHbJobScheduler() |
void |
register()
This method is called by Spring at initialisation and will register this collector with the provided
HBDataCollectorService |
void |
setHbDataCollectorService(HBDataCollectorService hbDataCollectorService) |
void |
setHbJobScheduler(HeartBeatJobScheduler hbJobScheduler) |
public HBBaseDataCollector(String collectorId, String collectorVersion, String cronExpression, HeartBeatJobScheduler hbJobScheduler)
collectorId - Unique collector ID e.g.: acs.repository.infocollectorVersion - Version of the collector e.g.: 1.0cronExpression - Cron expression that will be used to schedule jobs for this collector. e.g.: "0 0 0 ? * SUN" (Weekly)hbJobScheduler - Scheduler that will be used to schedule jobs for this collector.public String getCollectorId()
public String getCollectorVersion()
public String getCronExpression()
public void setHbDataCollectorService(HBDataCollectorService hbDataCollectorService)
public void setHbJobScheduler(HeartBeatJobScheduler hbJobScheduler)
hbJobScheduler - The scheduler which will be used to schedule jobs for this collector.public HeartBeatJobScheduler getHbJobScheduler()
public void register()
HBDataCollectorServicepublic void deregister()
HBDataCollectorServicepublic abstract List<org.alfresco.heartbeat.datasender.HBData> collectData()
HBDataCopyright © 2005–2018 Alfresco Software. All rights reserved.