APIdia Launch Partner
Top Description Inners Fields Constructors Methods
jdk.internal.org.jline.utils

public final Class ShutdownHooks

extends Object
Class Inheritance
Imports
java.util.ArrayList, .List, .Objects

Manages the JLine shutdown-hook thread and tasks to execute on shutdown.
Author
Jason Dillon
Since
2.7

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
ShutdownHooks.Task

Essentially a Runnable which allows running to throw an exception.

Field Summary

Modifier and TypeField and Description
private static Thread
private static final List<ShutdownHooks.Task>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static synchronized <T extends ShutdownHooks.Task> T
add(final T task)

private static Thread
addHook(final Thread thread)

public static synchronized void
private static void
removeHook(final Thread thread)

private static synchronized void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

hookback to summary
private static Thread hook
tasksback to summary
private static final List<ShutdownHooks.Task> tasks

Constructor Detail

ShutdownHooksback to summary
public ShutdownHooks()

Method Detail

addback to summary
public static synchronized <T extends ShutdownHooks.Task> T add(final T task)
addHookback to summary
private static Thread addHook(final Thread thread)
removeback to summary
public static synchronized void remove(final ShutdownHooks.Task task)
removeHookback to summary
private static void removeHook(final Thread thread)
runTasksback to summary
private static synchronized void runTasks()
jdk.internal.org.jline.utils back to summary

public Interface ShutdownHooks.Task


Essentially a Runnable which allows running to throw an exception.

Method Summary

Modifier and TypeMethod and Description
public void
run()

Method Detail

runback to summary
public void run() throws Exception