Skip to content

Package io.github.qishr.cascara.common.exec

Class JvmProcess

java.lang.Object
        io.github.qishr.cascara.common.exec.JvmProcess


public final class JvmProcess

Nested Class Summary

Modifier and Type Class Description
public static io.github.qishr.cascara.common.exec.JvmProcess.Response

Method Summary

Modifier and Type Method Description
public static JvmProcess forClass(Class<?> mainClass)
public JvmProcess setOptions(JvmOptions options)
public Response run() Synchronous blocking execution (Preserved signature for backwards compatibility).
public Response run(String input) Executes the process synchronously with optional standard input, blocking the calling thread until completion.
public CompletableFuture<Response> runAsync() Non-blocking background execution.
public CompletableFuture<Response> runAsync(String input) Non-blocking background execution with input.

Method Details

forClass

public static JvmProcess forClass(Class<?> mainClass)


setOptions

public JvmProcess setOptions(JvmOptions options)


run

public Response run()

Synchronous blocking execution (Preserved signature for backwards compatibility).

Throws:

IOException , InterruptedException


run

public Response run(String input)

Executes the process synchronously with optional standard input, blocking the calling thread until completion.

Parameters:

input - standard input payload to stream to the child process, or null

Returns:

the process execution response payload


runAsync

public CompletableFuture<Response> runAsync()

Non-blocking background execution.


runAsync

public CompletableFuture<Response> runAsync(String input)

Non-blocking background execution with input.