org.apache.ibatis.ibator.internal
Class NullProgressCallback

java.lang.Object
  extended by org.apache.ibatis.ibator.internal.NullProgressCallback
All Implemented Interfaces:
ProgressCallback
Direct Known Subclasses:
AntProgressCallback

public class NullProgressCallback
extends java.lang.Object
implements ProgressCallback

This class implements a progress callback that does nothing. It is used when the ibator client passes in a null for the ProgressCallback.

Author:
Jeff Butler

Constructor Summary
NullProgressCallback()
           
 
Method Summary
 void checkCancel()
          ibator will call this method periodically during a long running method.
 void done()
          ibator calls this method when all generated files have been saved
 void generationStarted(int totalTasks)
          Called to note the start of the generation phase, and to note the maximum number of startTask messages that will be sent for the generation phase.
 void introspectionStarted(int totalTasks)
          Called to note the start of the introspection phase, and to note the maximum number of startTask messages that will be sent for the introspection phase.
 void saveStarted(int totalTasks)
          Called to note the start of the file saving phase, and to note the maximum number of startTask messages that will be sent for the file saving phase phase.
 void startTask(java.lang.String taskName)
          Called to denote the beginning of a save task
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullProgressCallback

public NullProgressCallback()
Method Detail

generationStarted

public void generationStarted(int totalTasks)
Description copied from interface: ProgressCallback
Called to note the start of the generation phase, and to note the maximum number of startTask messages that will be sent for the generation phase.

Specified by:
generationStarted in interface ProgressCallback
Parameters:
totalTasks - the maximum number of times startTask will be called for the generation phase.

introspectionStarted

public void introspectionStarted(int totalTasks)
Description copied from interface: ProgressCallback
Called to note the start of the introspection phase, and to note the maximum number of startTask messages that will be sent for the introspection phase.

Specified by:
introspectionStarted in interface ProgressCallback
Parameters:
totalTasks - the maximum number of times startTask will be called for the introspection phase.

saveStarted

public void saveStarted(int totalTasks)
Description copied from interface: ProgressCallback
Called to note the start of the file saving phase, and to note the maximum number of startTask messages that will be sent for the file saving phase phase.

Specified by:
saveStarted in interface ProgressCallback
Parameters:
totalTasks - the maximum number of times startTask will be called for the file saving phase.

startTask

public void startTask(java.lang.String taskName)
Description copied from interface: ProgressCallback
Called to denote the beginning of a save task

Specified by:
startTask in interface ProgressCallback
Parameters:
taskName - a descriptive name of the current work step

checkCancel

public void checkCancel()
                 throws java.lang.InterruptedException
Description copied from interface: ProgressCallback
ibator will call this method periodically during a long running method. If the the implementation throws InterruptedException then the method will be canceled. Any files that have already been saved will remain on the file system.

Specified by:
checkCancel in interface ProgressCallback
Throws:
java.lang.InterruptedException - if the operation should be halted

done

public void done()
Description copied from interface: ProgressCallback
ibator calls this method when all generated files have been saved

Specified by:
done in interface ProgressCallback