パッケージ com.kazurayam.subprocessj
Executes arbitrary OS command in a sub-process, returns an object that includes the return code as int, STDOUT and STDERR as List<String>.
Subprocess
is a simple utility class that wraps
java.lang.ProcessBuilder.
It hides technical complexities of Threading to consume STDOUT and STDERR out of the forked subprocess.
The package is named as "subprocessj" because it is an homage to the Python Subprocess module.
-
クラスの概要 クラス 説明 CommandLocator CommandLocator.CommandLocatingResult HiThereServer A HTTP Server that listens to the IP port #8500.ProcessFinder ProcessFinder.ProcessFindingResult ProcessTerminator killProcessListeningPort(int portNumber) identifies the running process that is listening the IP port #portNumber, get the Process ID, then kill the process.ProcessTerminator.ProcessTerminationResult A Data Transfer Object that contains the return code, STDOUT of `lsof -i:port -P` command that reveals how ProcessKiller worked.Subprocess Subprocess object allows you to spawn new OS subprocess using java.lang.ProcessBuilder.Subprocess.CompletedProcess A Data Transfer Object that contains the return code, STDOUT and STDERR out of the executed subprocess.Subprocess.StreamGobbler -
列挙型の概要 列挙型 説明 OSType