Class ToolInvocationLogShutdownHook
- java.lang.Object
-
- java.lang.Thread
-
- com.unboundid.ldap.sdk.unboundidds.tools.ToolInvocationLogShutdownHook
-
- All Implemented Interfaces:
java.lang.Runnable
@ThreadSafety(level=NOT_THREADSAFE) public final class ToolInvocationLogShutdownHook extends java.lang.Thread
This class provides a thread that will be registered as a JVM shutdown hook for any command-line tool for which invocation logging is to be performed. If the tool is interrupted by a JVM shutdown (for example, if the JVM receives a kill signal, if the user presses Control+C, or the tool calls System.exit) before it can complete naturally, then this shutdown hook thread will be run to try to ensure that the tool invocation log includes a record of the abnormal shutdown.
NOTE: This class, and other classes within the
com.unboundid.ldap.sdk.unboundidds
package structure, are only supported for use against Ping Identity, UnboundID, and Nokia/Alcatel-Lucent 8661 server products. These classes provide support for proprietary functionality or for external specifications that are not considered stable or mature enough to be guaranteed to work in an interoperable way with other types of LDAP servers.
-
-
Constructor Summary
Constructors Constructor Description ToolInvocationLogShutdownHook(ToolInvocationLogDetails logDetails)
Creates a new instance of this shutdown hook with the provided log details.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
run()
Logs a completion message indicating that tool processing was interrupted by a JVM shutdown.-
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
-
-
-
Constructor Detail
-
ToolInvocationLogShutdownHook
public ToolInvocationLogShutdownHook(@NotNull ToolInvocationLogDetails logDetails)
Creates a new instance of this shutdown hook with the provided log details.- Parameters:
logDetails
- The log details of the tool. It must not benull
.
-
-
Method Detail
-
run
public void run()
Logs a completion message indicating that tool processing was interrupted by a JVM shutdown.- Specified by:
run
in interfacejava.lang.Runnable
- Overrides:
run
in classjava.lang.Thread
-
-