org.objectweb.howl.log
Interface ReplayListener


public interface ReplayListener

Objects that wish to read a log must implement the ReplayListener interface.

Author:
Michael Giroux
See Also:
Logger.replay(ReplayListener,long)

Method Summary
 LogRecord getLogRecord()
          Called by Logger when ReplayListener is registered for replay.
 void onError(LogException exception)
          Called by Logger when an exception is encountered during replay.
 void onRecord(LogRecord lr)
          Called by Logger for each record retrieved from the log.
 

Method Detail

onRecord

void onRecord(LogRecord lr)
Called by Logger for each record retrieved from the log.

when the entire log has been processed, lr.type is set to LogRecordType.END_OF_LOG.

Parameters:
lr - LogRecord to be processed

onError

void onError(LogException exception)
Called by Logger when an exception is encountered during replay.

Parameters:
exception - LogException object that was thrown when the error occurred.

getLogRecord

LogRecord getLogRecord()
Called by Logger when ReplayListener is registered for replay.

The Logger calls getLogRecord to obtain a LogRecord instance to be used to process log records.

The same LogRecord instance is used to return all log records to the ReplayListener.

Returns:
LogRecord object to be used when calling onRecord()


Copyright © 2003-2010 HOWL Development Team. All Rights Reserved.