com.borland.primetime.vfs
Interface VFSListener


public interface VFSListener
extends java.util.EventListener

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


Method Summary
 void bufferConflict(Buffer buffer)
          Invoked when the buffer has been modified and notices that it isn't in sync with the on-disk representation.
 

Method Detail

bufferConflict

public void bufferConflict(Buffer buffer)
Invoked when the buffer has been modified and notices that it isn't in sync with the on-disk representation. The VFS takes no action in this case other than calling the conflict resolver.

A typical resolver might display a dialog prompting the user to make a decision and either do nothing, leaving the buffer intact, or call buffer.revert() to force the VFS to use the on-disk representation.

A really sophisticated conflict resolver could bring up a merge facility to combine the in-memory buffer representation with the on-disk representation, and use VFS.getOutputStream(buffer.getUrl()) to stream the resulting combination back into the buffer and onto disk.

Parameters:
buffer - The Buffer instance in question.