com.revusky.oreo.xml
Class DataLogger

java.lang.Object
  |
  +--com.revusky.oreo.xml.DataLogger
All Implemented Interfaces:
DataListener, java.util.EventListener

public class DataLogger
extends java.lang.Object
implements DataListener

A DataListener implementation that logs data events in an XML format


Constructor Summary
DataLogger(java.io.File skelFile, java.io.File snapshotFile, java.io.File logFile)
           
DataLogger(MutableDataSource dataSource, java.util.Properties properties)
           
 
Method Summary
 void handleEvent(DataEvent event)
          handle the event when the MutableDataSource we are listening to has modified data
 void loadDataSourceFromFile()
           
 void rotateLog()
           
protected  boolean timeToRotate(DataEvent event)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataLogger

public DataLogger(MutableDataSource dataSource,
                  java.util.Properties properties)
           throws java.io.IOException

DataLogger

public DataLogger(java.io.File skelFile,
                  java.io.File snapshotFile,
                  java.io.File logFile)
           throws java.io.IOException
Method Detail

handleEvent

public void handleEvent(DataEvent event)
                 throws java.io.IOException
Description copied from interface: DataListener
handle the event when the MutableDataSource we are listening to has modified data
Specified by:
handleEvent in interface DataListener

loadDataSourceFromFile

public void loadDataSourceFromFile()
                            throws org.xml.sax.SAXException,
                                   java.io.IOException

rotateLog

public void rotateLog()
               throws java.io.IOException

timeToRotate

protected boolean timeToRotate(DataEvent event)