Package org.jline.utils
Class ShutdownHooks
java.lang.Object
org.jline.utils.ShutdownHooks
Manages the JLine shutdown-hook thread and tasks to execute on shutdown.
- Since:
- 2.7
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
Essentially aRunnable
which allows running to throw an exception. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static Thread
private static final List<ShutdownHooks.Task>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends ShutdownHooks.Task>
Tadd
(T task) private static Thread
static void
remove
(ShutdownHooks.Task task) private static void
removeHook
(Thread thread) private static void
runTasks()
-
Field Details
-
tasks
-
hook
-
-
Constructor Details
-
ShutdownHooks
public ShutdownHooks()
-
-
Method Details
-
add
-
runTasks
private static void runTasks() -
addHook
-
remove
-
removeHook
-