public class SystemExiter extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
SystemExiter.Exiter |
static interface |
SystemExiter.ExitLogger |
Constructor and Description |
---|
SystemExiter() |
Modifier and Type | Method and Description |
---|---|
static void |
abort(int status)
Equivalent to
logAndExit(ExitLogger, int) but with an ExitLogger that
writes an "Aborting..." message to the log. |
static void |
exit(int status)
Deprecated.
|
static void |
initialize(SystemExiter.Exiter exiter) |
static void |
logAndExit(SystemExiter.ExitLogger logger,
int status)
Calls
logBeforeExit(ExitLogger) and then invokes the SystemExiter.Exiter . |
static void |
logBeforeExit(SystemExiter.ExitLogger logger)
Invokes the exit logger if and only if no ExitLogger was previously invoked.
|
public static void initialize(SystemExiter.Exiter exiter)
public static void abort(int status)
logAndExit(ExitLogger, int)
but with an ExitLogger that
writes an "Aborting..." message to the log. So this method should only be
used for unexpected exits.status
- the status code to provide to the exiter@Deprecated public static void exit(int status)
logAndExit(ExitLogger, int)
or abort(int)
public static void logBeforeExit(SystemExiter.ExitLogger logger)
logger
- the logger. Cannot be null
public static void logAndExit(SystemExiter.ExitLogger logger, int status)
logBeforeExit(ExitLogger)
and then invokes the SystemExiter.Exiter
.logger
- logger the logger. Cannot be null
status
- the status code to provide to the exiterCopyright © 2023 JBoss by Red Hat. All rights reserved.