Return the ProcessWrapper (this) from the ProcessWrapper.registerShutdownHook() method.

This commit is contained in:
John Blum
2021-10-28 15:32:13 -07:00
parent b5be8da185
commit 1ef42b374a

View File

@@ -246,8 +246,9 @@ public class ProcessWrapper {
return listener != null && listeners.add(listener);
}
public void registerShutdownHook() {
public ProcessWrapper registerShutdownHook() {
Runtime.getRuntime().addShutdownHook(new Thread(this::shutdown));
return this;
}
public ProcessWrapper runningOn(String host) {