public abstract class WaarpShutdownHook extends Thread
Modifier and Type | Class and Description |
---|---|
static class |
WaarpShutdownHook.ShutdownConfiguration
Class for argument of creation of WaarpShutdownHook
|
Thread.State, Thread.UncaughtExceptionHandler
Modifier and Type | Field and Description |
---|---|
static WaarpShutdownHook |
shutdownHook
Thread for ShutdownHook
|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Modifier | Constructor and Description |
---|---|
protected |
WaarpShutdownHook(WaarpShutdownHook.ShutdownConfiguration configuration) |
Modifier and Type | Method and Description |
---|---|
static void |
addShutdownHook()
For Server part
|
protected abstract void |
exitService()
Real exit function
|
WaarpShutdownHook.ShutdownConfiguration |
getShutdownConfiguration() |
static boolean |
isInShutdown()
Says if the Process is currently in shutdown
|
static boolean |
isRestart() |
static boolean |
isShutdownStarting() |
void |
launchFinalExit()
Extra call to ensure exit after long delay
|
static void |
registerMain(Class<?> main,
String[] args)
Called to setup main class and args to enable restart
|
static void |
removeShutdownHook()
For Server part
|
void |
run() |
static void |
setRestart(boolean toRestart)
Set the way software should shutdown: with (true) or without restart
(false)
|
static void |
shutdownWillStart()
To specify that shutdown will soon start
|
static void |
terminate(boolean immediateSet)
This function is the top function to be called when the process is to be
shutdown.
|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
public static WaarpShutdownHook shutdownHook
protected WaarpShutdownHook(WaarpShutdownHook.ShutdownConfiguration configuration)
public WaarpShutdownHook.ShutdownConfiguration getShutdownConfiguration()
public static void addShutdownHook()
public static boolean isInShutdown()
public static boolean isShutdownStarting()
public static void shutdownWillStart()
public static void terminate(boolean immediateSet)
immediateSet
- public static void removeShutdownHook()
protected abstract void exitService()
public static boolean isRestart()
public void launchFinalExit()
public static void setRestart(boolean toRestart)
toRestart
- public static void registerMain(Class<?> main, String[] args)
main
- args
- Copyright © 2009–2020 Waarp. All rights reserved.