public class GenericSummarizer extends DataCollectorService implements DataCollector, Schedulable, LogListener
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
SERVICE_INFO_KEY
DEFAULT_LOG_TRACE_STATUS
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
Constructor and Description |
---|
GenericSummarizer() |
Modifier and Type | Method and Description |
---|---|
void |
addDataItem(java.lang.Object pDataItem)
Add a data item to the aggregate
|
void |
addDataListener(DataListener pListener)
Adds a listener to the list of data listeners
|
void |
doStartService()
Perform any necessary initializations to startup service.
If a schedule is provided, then it is started. |
void |
doStopService()
Performs tasks required to shutdown service.
|
int |
getBatchItemCount()
Returns property BatchItemCount
|
int |
getDataItemThreshold()
Returns property DataItemThreshold
|
int |
getDataListenerCount()
Returns the number of data listeners
|
DataListener[] |
getDataListeners()
Returns the list of data listeners as an array property
|
java.lang.String[] |
getGroupBy()
Returns property GroupBy
|
java.lang.String |
getJobDescription()
Returns property JobDescription
|
java.lang.String |
getJobName()
Returns property JobName
|
Schedule |
getSchedule()
Returns property Schedule
|
Scheduler |
getScheduler()
Returns property Scheduler
|
int |
getTotalItemCount()
Returns property TotalItemCount
|
void |
localFlush()
Flush summarized data to our listeners
|
void |
logEvent(LogEvent pLogEvent)
Log an event.
|
void |
performScheduledTask(Scheduler pScheduler,
ScheduledJob pJob)
Callback method for the scheduler.
|
void |
removeDataListener(DataListener pListener)
Removes a listener from the list of data listeners
|
void |
sendDataItem(java.lang.Object pDataItem)
Sends a data item to all of the listeners
|
void |
setDataItemThreshold(int pDataItemThreshold)
Sets property DataItemThreshold
|
void |
setGroupBy(java.lang.String[] pGroupBy)
Sets property GroupBy
|
void |
setJobDescription(java.lang.String pJobDescription)
Sets property JobDescription
|
void |
setJobName(java.lang.String pJobName)
Sets property JobName
|
void |
setSchedule(Schedule pSchedule)
Sets property Schedule
|
void |
setScheduler(Scheduler pScheduler)
Sets property Scheduler
|
void |
setTotalItemCount(int pTotalItemCount)
Sets property TotalItemCount
|
flush, flushListeners, isPropagateFlush, setPropagateFlush
addLogListener, createAdminServlet, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
flush
public void setTotalItemCount(int pTotalItemCount)
public int getTotalItemCount()
public int getBatchItemCount()
public void setGroupBy(java.lang.String[] pGroupBy)
public java.lang.String[] getGroupBy()
public void setScheduler(Scheduler pScheduler)
public Scheduler getScheduler()
public void setSchedule(Schedule pSchedule)
public Schedule getSchedule()
public void setJobName(java.lang.String pJobName)
public java.lang.String getJobName()
public void setJobDescription(java.lang.String pJobDescription)
public java.lang.String getJobDescription()
public void setDataItemThreshold(int pDataItemThreshold)
public int getDataItemThreshold()
public void sendDataItem(java.lang.Object pDataItem)
public void addDataListener(DataListener pListener)
public void removeDataListener(DataListener pListener)
public DataListener[] getDataListeners()
public int getDataListenerCount()
public void logEvent(LogEvent pLogEvent)
logEvent
in interface LogListener
pLogEvent
- the log eventpublic void addDataItem(java.lang.Object pDataItem)
addDataItem
in interface DataListener
pDataItem
- item to addpublic void performScheduledTask(Scheduler pScheduler, ScheduledJob pJob)
performScheduledTask
in interface Schedulable
pScheduler
- calling the jobpJob
- the ScheduledJobpublic void localFlush()
localFlush
in class DataCollectorService
public void doStartService() throws ServiceException
doStartService
in class GenericService
ServiceException
- if the Service had a problem starting uppublic void doStopService() throws ServiceException
doStopService
in class DataCollectorService
ServiceException
- if the Service had a problem shutting down