Interface ProcessTerminator

  • All Known Implementing Classes:
    DefaultProcessTerminator

    public interface ProcessTerminator
    This is a service responsible for abnormal termination of forked processes (and generic processes which have been started during test execution, for example by a fixture, which are encouraged to have an instance of this interface injected for usage). It is being called to terminate all "child" processes in the shutdown hook of the main test runner VM.
    Author:
    Rene Schneider - initial API and implementation
    • Method Detail

      • registerFork

        void registerFork​(Fork aFork)
        Registers a fork with the terminator.
        Parameters:
        aFork - the fork to register
      • unregisterFork

        void unregisterFork​(Fork aFork)
        Unregisters a fork from the terminator.
        Parameters:
        aFork - the fork to unregister
      • registerProcess

        void registerProcess​(java.lang.Process aProcess)
        Registers a Process with the terminator.
        Parameters:
        aProcess - the process to register
      • unregisterProcess

        void unregisterProcess​(java.lang.Process aProcess)
        Unregisters a Process from the terminator.
        Parameters:
        aProcess - the process to unregister
      • killAndWait

        boolean killAndWait​(int aTimeout)
        Kill all known forks and processes.
        Parameters:
        aTimeout -
        Returns: