Class ProcessTerminator


  • public class ProcessTerminator
    extends java.lang.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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void logAndDie​(java.lang.String message)
      Logs and dies without taking a thread dump
      void logAndDie​(java.lang.String message, boolean dumpThreads)
      Logs and dies
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ProcessTerminator

        public ProcessTerminator()
    • Method Detail

      • logAndDie

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

        public void logAndDie​(java.lang.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