Package com.github.mike10004.xvfbmanager
Class ShutdownHookProcessTracker
- java.lang.Object
-
- com.github.mike10004.xvfbmanager.ShutdownHookProcessTracker
-
- All Implemented Interfaces:
io.github.mike10004.subprocess.ProcessTracker
public class ShutdownHookProcessTracker extends Object implements io.github.mike10004.subprocess.ProcessTracker
Process tracker that adds a shutdown hook to terminate processes that are still alive when the JVM exits. This is backed by theProcessDestroyerfrom Apache Ant, which I vaguely trust, mostly because it's been around and heavily used for so long.
-
-
Constructor Summary
Constructors Constructor Description ShutdownHookProcessTracker()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intactiveCount()voidadd(Process process)static io.github.mike10004.subprocess.ProcessTrackergetInstance()booleanremove(Process process)
-
-
-
Method Detail
-
getInstance
public static io.github.mike10004.subprocess.ProcessTracker getInstance()
-
add
public void add(Process process)
- Specified by:
addin interfaceio.github.mike10004.subprocess.ProcessTracker
-
remove
public boolean remove(Process process)
- Specified by:
removein interfaceio.github.mike10004.subprocess.ProcessTracker
-
activeCount
public int activeCount()
- Specified by:
activeCountin interfaceio.github.mike10004.subprocess.ProcessTracker
-
-