Package de.galan.commons.util
Class JvmUtil.TerminateBuilder
java.lang.Object
de.galan.commons.util.JvmUtil.TerminateBuilder
- Enclosing class:
- JvmUtil
Builder to terminate the JVM
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringvoidStops the JVM in the specified timeAdds an optional user-defined message to the termination log.voidnow()Stops the JVM immediatelyreturnCode(int returnCode) Sets the exit value, default is 0 (zero).protected voidprotected voidshutdownFinal(String time) threaded(boolean threaded) Starts the termination in a separate thread or blocking, default is true.Will print the message and stacktrace for the Throwable if provided.
-
Constructor Details
-
TerminateBuilder
public TerminateBuilder()
-
-
Method Details
-
returnCode
Sets the exit value, default is 0 (zero). -
threaded
Starts the termination in a separate thread or blocking, default is true. -
throwable
Will print the message and stacktrace for the Throwable if provided. -
message
Adds an optional user-defined message to the termination log. -
in
Stops the JVM in the specified time -
now
public void now()Stops the JVM immediately -
shutdown
-
getMessage
-
shutdownFinal
-