Class DataSource

  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:

Field Summary
static java.lang.String CLASS_VERSION
          Class version string
Fields inherited from class atg.nucleus.GenericService
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging
Fields inherited from interface atg.nucleus.logging.ApplicationLogging
Constructor Summary
          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


public static java.lang.String CLASS_VERSION
Class version string

Constructor Detail


public DataSource()
Construct a DataSource

Method Detail


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


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


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


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


public int getDataListenerCount()
Returns the number of data listeners