atg.service.datacollection
Class DataSource

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.service.datacollection.DataSource
All Implemented Interfaces:
NameContextBindingListener, NameContextElement, NameResolver, AdminableService, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, java.util.EventListener

public class DataSource
extends GenericService

Sample data source implementation. To be a data source, you can:

  1. subclass DataSource
  2. encapsulate DataSource (i.e., declare a DataSource object in your object and pass through the DataListener method calls
  3. implement the DataListener calls yourself
  4. if you are a GenericService, and your datapoints are LogEvents, and you don't feel like writing code you can just call sendLogEvent
This class is not used by the data collection package. DataSource serves as a sample of the design pattern to follow to be source of data items. The GenericSummarizer is also a source of data items, and implements the relevant DataListener calls itself.

See Also:
GenericSummarizer

Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Fields inherited from class atg.nucleus.GenericService
SERVICE_INFO_KEY
 
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging
DEFAULT_LOG_TRACE_STATUS
 
Fields inherited from interface atg.nucleus.logging.ApplicationLogging
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
 
Constructor Summary
DataSource()
          Construct a DataSource
 
Method Summary
 void addDataListener(DataListener pListener)
          Adds a listener to the list of data listeners
 int getDataListenerCount()
          Returns the number of data listeners
 DataListener[] getDataListeners()
          Returns the list of data listeners as an array property
 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
 
Methods inherited from class atg.nucleus.GenericService
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, 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, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
 
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string

Constructor Detail

DataSource

public DataSource()
Construct a DataSource

Method Detail

sendDataItem

public void sendDataItem(java.lang.Object pDataItem)
Sends a data item to all of the listeners


addDataListener

public void addDataListener(DataListener pListener)
Adds a listener to the list of data listeners


removeDataListener

public void removeDataListener(DataListener pListener)
Removes a listener from the list of data listeners


getDataListeners

public DataListener[] getDataListeners()
Returns the list of data listeners as an array property


getDataListenerCount

public int getDataListenerCount()
Returns the number of data listeners