Package org.alfresco.heartbeat
Class HBBaseDataCollector
- java.lang.Object
-
- org.alfresco.heartbeat.HBBaseDataCollector
-
- Direct Known Subclasses:
AuthoritiesDataCollector,ConfigurationDataCollector,InfoDataCollector,ModelUsageDataCollector,SessionsUsageDataCollector,SystemUsageDataCollector
public abstract class HBBaseDataCollector extends java.lang.ObjectThis 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
Example Javadoc for implementations:HeartBeatJobSchedulerwhich is then used by theHBDataCollectorServiceto schedule and unschedule jobs for this collector.- Collector ID: a.collector.id
- Data:
- dataP1: data type - description
- dataP2: data type - description ...
- Author:
- eknizat
-
-
Constructor Summary
Constructors Constructor Description HBBaseDataCollector(java.lang.String collectorId, java.lang.String collectorVersion, java.lang.String cronExpression, HeartBeatJobScheduler hbJobScheduler)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract java.util.List<org.alfresco.heartbeat.datasender.HBData>collectData()This method returns data to be collected.voidderegister()This method is called by Spring at initialisation and will deregister this collector with the providedHBDataCollectorServicejava.lang.StringgetCollectorId()java.lang.StringgetCollectorVersion()java.lang.StringgetCronExpression()HeartBeatJobSchedulergetHbJobScheduler()voidregister()This method is called by Spring at initialisation and will register this collector with the providedHBDataCollectorServicevoidsetHbDataCollectorService(HBDataCollectorService hbDataCollectorService)voidsetHbJobScheduler(HeartBeatJobScheduler hbJobScheduler)
-
-
-
Constructor Detail
-
HBBaseDataCollector
public HBBaseDataCollector(java.lang.String collectorId, java.lang.String collectorVersion, java.lang.String cronExpression, HeartBeatJobScheduler hbJobScheduler)- Parameters:
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.
-
-
Method Detail
-
getCollectorId
public java.lang.String getCollectorId()
-
getCollectorVersion
public java.lang.String getCollectorVersion()
-
getCronExpression
public java.lang.String getCronExpression()
-
setHbDataCollectorService
public void setHbDataCollectorService(HBDataCollectorService hbDataCollectorService)
-
setHbJobScheduler
public void setHbJobScheduler(HeartBeatJobScheduler hbJobScheduler)
- Parameters:
hbJobScheduler- The scheduler which will be used to schedule jobs for this collector.
-
getHbJobScheduler
public HeartBeatJobScheduler getHbJobScheduler()
- Returns:
- JobScheduler used to schedule jobs for this collector.
-
register
public void register()
This method is called by Spring at initialisation and will register this collector with the providedHBDataCollectorService
-
deregister
public void deregister()
This method is called by Spring at initialisation and will deregister this collector with the providedHBDataCollectorService
-
collectData
public abstract java.util.List<org.alfresco.heartbeat.datasender.HBData> collectData()
This method returns data to be collected.- Returns:
- List of
HBData
-
-