|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.oreodata.standalone.DefaultDataLogger
A DataListener implementation that logs data events to a file.
Constructor Summary | |
DefaultDataLogger(OreoDataSource dataSource,
java.io.File logFile,
boolean useXML,
java.lang.String encoding)
Creates a new DefaultDataLogger |
Method Summary | |
org.xml.sax.InputSource |
asInputSource()
|
void |
handleEvent(DataEvent event)
handle the event when the OreoDataSource we are listening to has modified data |
void |
init(java.util.Properties properties)
used in the startup phase to initialize the object based on properties. |
protected void |
logEventXML(DataEvent event)
log the transaction in an XML format. |
void |
rotateLogs()
Method that starts a new log file, archiving the present one etcetera. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DefaultDataLogger(OreoDataSource dataSource, java.io.File logFile, boolean useXML, java.lang.String encoding) throws java.io.IOException
dataSource
- the data source to listen to.logFile
- the location of the file (must be writeable)useXML
- whether to log in XML format.encoding
- the character encoding (only applicable if useXML is true)Method Detail |
public void init(java.util.Properties properties) throws java.io.IOException
DataListener
init
in interface DataListener
java.io.IOException
public void handleEvent(DataEvent event) throws java.io.IOException
DataListener
handleEvent
in interface DataListener
java.io.IOException
protected void logEventXML(DataEvent event) throws java.io.IOException
java.io.IOException
public org.xml.sax.InputSource asInputSource() throws java.io.IOException
asInputSource
in interface DataLogger
java.io.IOException
public void rotateLogs() throws java.io.IOException
DataLogger
rotateLogs
in interface DataLogger
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |