Modifier and Type | Method and Description |
---|---|
static void |
fatalError(org.slf4j.Logger logger,
String format,
Object... args)
Logs a fatal error and then exits the system.
|
static void |
fatalError(org.slf4j.Logger logger,
Throwable t,
String format,
Object... args)
Logs a fatal error and then exits the system.
|
static void |
run(Process process)
Runs the given
Process . |
static void |
stopProcessOnShutdown(Process process)
Adds a shutdown hook that will be invoked when a signal is sent to this process.
|
public static void run(Process process)
Process
. This method should only be called from main()
methods.process
- the Process
to runpublic static void fatalError(org.slf4j.Logger logger, String format, Object... args)
logger
- the logger to log toformat
- the error message format stringargs
- args for the format stringpublic static void fatalError(org.slf4j.Logger logger, Throwable t, String format, Object... args)
logger
- the logger to log tot
- the throwable causing the fatal errorformat
- the error message format stringargs
- args for the format stringpublic static void stopProcessOnShutdown(Process process)
Process.stop()
method to cleanly release the resources and exit.process
- the data structure representing the process to terminateCopyright © 2023. All Rights Reserved.