Class JvmUtil.TerminateBuilder

java.lang.Object
de.galan.commons.util.JvmUtil.TerminateBuilder
Enclosing class:
JvmUtil

public static class JvmUtil.TerminateBuilder extends Object
Builder to terminate the JVM
  • Constructor Details

    • TerminateBuilder

      public TerminateBuilder()
  • Method Details

    • returnCode

      public JvmUtil.TerminateBuilder returnCode(int returnCode)
      Sets the exit value, default is 0 (zero).
    • threaded

      public JvmUtil.TerminateBuilder threaded(boolean threaded)
      Starts the termination in a separate thread or blocking, default is true.
    • throwable

      public JvmUtil.TerminateBuilder throwable(Throwable throwable)
      Will print the message and stacktrace for the Throwable if provided.
    • message

      public JvmUtil.TerminateBuilder message(String message)
      Adds an optional user-defined message to the termination log.
    • in

      public void in(String time)
      Stops the JVM in the specified time
    • now

      public void now()
      Stops the JVM immediately
    • shutdown

      protected void shutdown(String time)
    • getMessage

      protected String getMessage()
    • shutdownFinal

      protected void shutdownFinal(String time)