Interface ProcessTerminator
-
- All Known Implementing Classes:
DefaultProcessTerminator
public interface ProcessTerminatorThis 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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleankillAndWait(int aTimeout)Kill all known forks and processes.voidregisterFork(Fork aFork)Registers a fork with the terminator.voidregisterProcess(java.lang.Process aProcess)Registers aProcesswith the terminator.voidunregisterFork(Fork aFork)Unregisters a fork from the terminator.voidunregisterProcess(java.lang.Process aProcess)Unregisters aProcessfrom the terminator.
-
-
-
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 aProcesswith the terminator.- Parameters:
aProcess- the process to register
-
unregisterProcess
void unregisterProcess(java.lang.Process aProcess)
Unregisters aProcessfrom the terminator.- Parameters:
aProcess- the process to unregister
-
killAndWait
boolean killAndWait(int aTimeout)
Kill all known forks and processes.- Parameters:
aTimeout-- Returns:
-
-