public abstract class ServiceUtils extends Object
Modifier and Type | Field and Description |
---|---|
static Consumer<Integer> |
LOG_ONLY
No-op strategy, useful for tests.
|
static Consumer<Integer> |
SYSTEM_EXIT
Default strategy for shutting down the JVM.
|
Modifier and Type | Method and Description |
---|---|
static void |
requestSystemExit(int code)
Force shutdown of the JVM using System.exit.
|
static void |
setSystemExitProcedure(Consumer<Integer> systemExitProcedure)
Override system callback.
|
public static final Consumer<Integer> SYSTEM_EXIT
public static void setSystemExitProcedure(Consumer<Integer> systemExitProcedure)
systemExitProcedure
- public static void requestSystemExit(int code)
code
- the exit codeExitCode
Copyright © 2008–2021 The Apache Software Foundation. All rights reserved.