Package org.jboss.as.server
Class SystemExiter
java.lang.Object
org.jboss.as.server.SystemExiter
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 ClassesModifier and TypeClassDescriptionstatic interfacestatic interface -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidabort(int status) Equivalent tologAndExit(ExitLogger, int)but with an ExitLogger that writes an "Aborting..." message to the log.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 void
-
Constructor Details
-
SystemExiter
public SystemExiter()
-
-
Method Details
-
initialize
-
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() -
logBeforeExit
Invokes the exit logger if and only if no ExitLogger was previously invoked.- Parameters:
logger- the logger. Cannot benull
-
logAndExit
CallslogBeforeExit(ExitLogger)and then invokes theSystemExiter.Exiter.- Parameters:
logger- logger the logger. Cannot benullstatus- the status code to provide to the exiter
-