Class DefaultProcessTerminator

  • All Implemented Interfaces:
    ProcessTerminator

    public class DefaultProcessTerminator
    extends java.lang.Object
    implements ProcessTerminator
    The standard process terminator implementation.
    Author:
    Rene Schneider - initial API and implementation
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.List<Fork> forks
      List of all known forks.
      protected boolean ignoreDeregistrations
      We need to ignore deregistrations from outside during kill phases.
      protected java.util.List<java.lang.Process> processes
      List of all known generic processes.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean killAndWait​(int aTimeout)
      Kill all known forks and processes.
      void registerFork​(Fork aFork)
      Registers a fork with the terminator.
      void registerProcess​(java.lang.Process aProcess)
      Registers a Process with the terminator.
      void unregisterFork​(Fork aFork)
      Unregisters a fork from the terminator.
      void unregisterProcess​(java.lang.Process aProcess)
      Unregisters a Process from the terminator.
      • Methods inherited from class java.lang.Object

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

      • forks

        protected java.util.List<Fork> forks
        List of all known forks.
      • processes

        protected java.util.List<java.lang.Process> processes
        List of all known generic processes.
      • ignoreDeregistrations

        protected boolean ignoreDeregistrations
        We need to ignore deregistrations from outside during kill phases.
    • Constructor Detail

      • DefaultProcessTerminator

        public DefaultProcessTerminator()
    • Method Detail

      • registerFork

        public void registerFork​(Fork aFork)
        Description copied from interface: ProcessTerminator
        Registers a fork with the terminator.
        Specified by:
        registerFork in interface ProcessTerminator
        Parameters:
        aFork - the fork to register
      • unregisterFork

        public void unregisterFork​(Fork aFork)
        Description copied from interface: ProcessTerminator
        Unregisters a fork from the terminator.
        Specified by:
        unregisterFork in interface ProcessTerminator
        Parameters:
        aFork - the fork to unregister
      • registerProcess

        public void registerProcess​(java.lang.Process aProcess)
        Description copied from interface: ProcessTerminator
        Registers a Process with the terminator.
        Specified by:
        registerProcess in interface ProcessTerminator
        Parameters:
        aProcess - the process to register
      • unregisterProcess

        public void unregisterProcess​(java.lang.Process aProcess)
        Description copied from interface: ProcessTerminator
        Unregisters a Process from the terminator.
        Specified by:
        unregisterProcess in interface ProcessTerminator
        Parameters:
        aProcess - the process to unregister