ccs.cpc.impl
Class RecurseUpdater

java.lang.Object
  extended by ccs.cpc.impl.RecurseUpdater
All Implemented Interfaces:
java.lang.Runnable

 class RecurseUpdater
extends java.lang.Object
implements java.lang.Runnable

Potentially long-running processes such as recursions run in a worker thread. Periodically these need to either send back progress reports to let the user know what's going on, or perform an interaction. These need to happen in the dispatch thread.


Constructor Summary
RecurseUpdater(CpcImpl cpc)
           
 
Method Summary
(package private)  int confirm(java.lang.String title, java.lang.Object o)
          Request a confirmation, using MsgBox.quinconfirm.
(package private)  boolean hurl(java.lang.Exception e)
          Report an exception.
(package private)  void postCompact()
          Perform a compaction post-process, ie. the required cleanup (only).
(package private)  void postRecurse(VFileProcessor vfp)
          Perform a recursion post-process and the required cleanup.
(package private)  void reset()
          Reset the updater at the start of a long-running process.
 void run()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RecurseUpdater

RecurseUpdater(CpcImpl cpc)
Method Detail

reset

void reset()
Reset the updater at the start of a long-running process. (The updater is stateful.)


confirm

int confirm(java.lang.String title,
            java.lang.Object o)
Request a confirmation, using MsgBox.quinconfirm.

Parameters:
title - The dialog title.
o - the payload for the dialog, usually either a String or an Object[].
Returns:
the raw quinConfirm result.

hurl

boolean hurl(java.lang.Exception e)
Report an exception. Return whether to continue. If the exception is RecursionFailedException, always returns false.


postRecurse

void postRecurse(VFileProcessor vfp)
Perform a recursion post-process and the required cleanup.


postCompact

void postCompact()
Perform a compaction post-process, ie. the required cleanup (only).


run

public void run()
Specified by:
run in interface java.lang.Runnable