Package de.gebit.integrity.runner.forking.processes

## Class DefaultProcessTerminator

- java.lang.Object
- - de.gebit.integrity.runner.forking.processes.DefaultProcessTerminator

- All Implemented Interfaces:
    `ProcessTerminator`

      public class DefaultProcessTerminator
      extends Object
      implements ProcessTerminator

  The standard process terminator implementation.
  Author:
    Rene Schneider - initial API and implementation

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected List<Fork>` | `forks` | List of all known forks.
    `protected boolean` | `ignoreDeregistrations` | We need to ignore deregistrations from outside during kill phases.
    `protected List<Process>` | `processes` | List of all known generic processes.

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `DefaultProcessTerminator()` |

  - ### 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​(Process aProcess)` | Registers a `Process` with the terminator.
    `void` | `unregisterFork​(Fork aFork)` | Unregisters a fork from the terminator.
    `void` | `unregisterProcess​(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 List<Fork> forks

      List of all known forks.

    - #### processes

          protected List<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​(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​(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

    - #### killAndWait

          public boolean killAndWait​(int aTimeout)

      Description copied from interface: `ProcessTerminator`
      Kill all known forks and processes.
      Specified by:
        `killAndWait` in interface `ProcessTerminator`
      Returns: