Package org.jboss.as.server
Class SystemExiter
- java.lang.Object
-
- org.jboss.as.server.SystemExiter
-
public class SystemExiter extends Object
Used to override System.exit() calls. For our tests we don't want System.exit to have any effect.- Version:
- $Revision: 1.1 $
- Author:
- Kabir Khan
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceSystemExiter.Exiterstatic interfaceSystemExiter.ExitLogger
-
Constructor Summary
Constructors Constructor Description SystemExiter()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static voidabort(int status)Equivalent tologAndExit(ExitLogger, int)but with an ExitLogger that writes an "Aborting..." message to the log.static voidexit(int status)Deprecated.static voidinitialize(SystemExiter.Exiter exiter)static voidlogAndExit(SystemExiter.ExitLogger logger, int status)CallslogBeforeExit(ExitLogger)and then invokes theSystemExiter.Exiter.static voidlogBeforeExit(SystemExiter.ExitLogger logger)Invokes the exit logger if and only if no ExitLogger was previously invoked.static voidsafeAbort()
-
-
-
Method Detail
-
initialize
public static void initialize(SystemExiter.Exiter exiter)
-
abort
public static void abort(int status)
Equivalent tologAndExit(ExitLogger, int)but with an ExitLogger that writes an "Aborting..." message to the log. So this method should only be used for unexpected exits.- Parameters:
status- the status code to provide to the exiter
-
safeAbort
public static void safeAbort()
-
exit
@Deprecated public static void exit(int status)
Deprecated.
-
logBeforeExit
public static void logBeforeExit(SystemExiter.ExitLogger logger)
Invokes the exit logger if and only if no ExitLogger was previously invoked.- Parameters:
logger- the logger. Cannot benull
-
logAndExit
public static void logAndExit(SystemExiter.ExitLogger logger, int status)
CallslogBeforeExit(ExitLogger)and then invokes theSystemExiter.Exiter.- Parameters:
logger- logger the logger. Cannot benullstatus- the status code to provide to the exiter
-
-