io.github.laskowski.shell.service.DefaultProcessRunner Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of shell-commander Show documentation
Show all versions of shell-commander Show documentation
Library to launch .bat and .sh scripts of your choice with different configurations. Allows you to read tasks and services output from terminal
The newest version!
package io.github.laskowski.shell.service;
import io.github.laskowski.shell.runner.DefaultShellTaskRunner;
public class DefaultProcessRunner implements ProcessRunner {
private static DefaultProcessRunner instance;
public static DefaultProcessRunner getInstance() {
if (instance == null) {
instance = new DefaultProcessRunner();
}
return instance;
}
private DefaultProcessRunner() {}
@Override
public void run(Service service) {
DefaultShellTaskRunner.getInstance()
.run(service.getShellTask(),
service.getOutputListener(),
service.getServiceReadyStrategy());
}
}