com.borland.primetime.vfs
Interface BufferListener


public interface BufferListener
extends java.util.EventListener

The listener interface for receiving buffer events. The class that is interested in processing a buffer events implements this interface, and objects created with that class can be registered with a buffer, using the buffer's addBufferListener method.


Method Summary
 void bufferChanged(Buffer buffer, BufferUpdater updater)
          Invoked when the content of a buffer is changed.
 void bufferLoaded(Buffer buffer)
          Invoked after the content of the buffer has changed because the buffer has been updated from persistant storage.
 void bufferSaving(Buffer buffer)
          Invoked immediately before the content of the buffer is saved to persistant storage.
 void bufferStateChanged(Buffer buffer, int oldState, int newState)
          Invoked when any of the state flags on a buffer changes.
 

Method Detail

bufferChanged

public void bufferChanged(Buffer buffer,
                          BufferUpdater updater)
Invoked when the content of a buffer is changed. If the buffer has been modified with a lazy buffer updater, the identity of the updater can be used to ensure that the updater itself does not try to pull the new contents.
Parameters:
buffer - The Buffer instance that has changed.
updater - The BufferUpdater instance used to make a lazy change, or null if the change was made to the buffer by streaming I/O or byte array replacement.

bufferLoaded

public void bufferLoaded(Buffer buffer)
Invoked after the content of the buffer has changed because the buffer has been updated from persistant storage.
Parameters:
buffer - The Buffer instance that has changed.

bufferSaving

public void bufferSaving(Buffer buffer)
Invoked immediately before the content of the buffer is saved to persistant storage.
Parameters:
buffer - The Buffer instance that is being saved.

bufferStateChanged

public void bufferStateChanged(Buffer buffer,
                               int oldState,
                               int newState)
Invoked when any of the state flags on a buffer changes.
Parameters:
buffer - The Buffer instance that has changed.