net.refractions.udig.ui
Class ShutdownTaskList

java.lang.Object
  extended by net.refractions.udig.ui.ShutdownTaskList

public class ShutdownTaskList
extends java.lang.Object

This class allows a plugin to add an IShutdownTask object that will be run when uDig shuts down. It allows a single place for shutdown tasks such as saving the catalog or projects or anything else.

Since:
1.1.0
Author:
Jesse

Nested Class Summary
static class ShutdownTaskList.PostTask
           
static class ShutdownTaskList.PreTask
           
 
Constructor Summary
ShutdownTaskList()
           
 
Method Summary
 void addPostShutdownTask(PostShutdownTask task)
          Adds a task to the list of tasks to be run post shutdown.
 void addPreShutdownTask(PreShutdownTask task)
          Adds a task to the list of tasks to be run post shutdown.
static ShutdownTaskList instance()
           
 void postShutdown(IWorkbench workbench)
           
 boolean preShutdown(IWorkbench workbench, boolean forced)
           
 void removePostShutdownTask(PostShutdownTask shutdownTask)
           
 void removePreShutdownTask(PreShutdownTask shutdownTask)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShutdownTaskList

public ShutdownTaskList()
Method Detail

postShutdown

public void postShutdown(IWorkbench workbench)

preShutdown

public boolean preShutdown(IWorkbench workbench,
                           boolean forced)

instance

public static ShutdownTaskList instance()

addPostShutdownTask

public void addPostShutdownTask(PostShutdownTask task)
Adds a task to the list of tasks to be run post shutdown.

Parameters:
task - the task to be ran. The ordering or the tasks ran is random so make sure there are no order dependencies between tasks
See Also:
postShutdown(IWorkbench)

addPreShutdownTask

public void addPreShutdownTask(PreShutdownTask task)
Adds a task to the list of tasks to be run post shutdown.

Parameters:
task - the task to be ran. The ordering or the tasks ran is random so make sure there are no order dependencies between tasks
See Also:
postShutdown(IWorkbench)

removePreShutdownTask

public void removePreShutdownTask(PreShutdownTask shutdownTask)

removePostShutdownTask

public void removePostShutdownTask(PostShutdownTask shutdownTask)