com.ccg.io
Interface FileLineIndexListener


public interface FileLineIndexListener

A "listener interface" for those that want to monitor changes in a indexed file.

The FileLineIndex allows objects which implement this interface to be notified when a change is detected in the length of the indexed file. For example, the TailViewer class uses this facility so that it can continuously update itself to show the end of a file.

Since:
1.0
Version:
$Revision: 1.1 $
Author:
$Author: pkb $
See Also:
FileLineIndex.addFileLineIndexListener(com.ccg.io.FileLineIndexListener), FileLineIndex.removeFileLineIndexListener(com.ccg.io.FileLineIndexListener)

Method Summary
 void availableLinesUpdate(FileLineIndex fli, long olc, long nlc)
          Callback method which indicates that the number of lines in a FileLineIndex object have changed.
 

Method Detail

availableLinesUpdate

void availableLinesUpdate(FileLineIndex fli,
                          long olc,
                          long nlc)
Callback method which indicates that the number of lines in a FileLineIndex object have changed.

The FileLineIndex object is designed to monitor "log" style files (ASCII files which only grow in size). This call back method is used to monitor when the contents of the file change (typically grow).

Parameters:
fli - The FileLineIndex object the event originated from - never null.
olc - The original (old) line count (prior to the update).
nlc - The new line count that is now available.
Since:
1.0
See Also:
FileLineIndex


Copyright 1998-1998-2006 null. All Rights Reserved.