net.refractions.udig.ui
Class ShutdownTaskList
java.lang.Object
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ShutdownTaskList
public ShutdownTaskList()
postShutdown
public void postShutdown(IWorkbench workbench)
preShutdown
public boolean preShutdown(IWorkbench workbench,
boolean forced)
instance
public static ShutdownTaskList instance()
- Returns the shared instance for the application. In most cases this method should
be used to get an instance of ShutdownTaskList instead of creating a new instance.
- Returns:
- The shared instance of ShutdownTaskList
addPostShutdownTask
public void addPostShutdownTask(PostShutdownTask task)
- Adds a task to the list of tasks to be run after 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 before 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)