Class ProcessTerminator


  • public class ProcessTerminator
    extends Object
    An injectable terminator of the Java vm. Components that encounters conditions where the vm should be terminated should request an instance of this injected. That makes termination testable as tests can create subclasses of this which register the termination request rather than terminating.
    Author:
    bratseth
    • Constructor Detail

      • ProcessTerminator

        public ProcessTerminator()
    • Method Detail

      • logAndDie

        public void logAndDie​(String message)
        Logs and dies without taking a thread dump
      • logAndDie

        public void logAndDie​(String message,
                              boolean dumpThreads)
        Logs and dies
        Parameters:
        dumpThreads - if true the stack trace of all threads is dumped to the log with level info before shutting down