Interface Process
-
Method Summary
Modifier and TypeMethodDescriptionexitCode()getTty()default booleanAttempt to interrupt the process.booleanAttempt to interrupt the process.default voidresume()Suspend the process.default voidresume(boolean foreground) Suspend the process.voidSuspend the process.default voidSuspend the process.default voidrun()Run the process.voidrun(boolean foregraound) Run the process.setSession(Session session) Set the process sessionSet the process tty.status()default voidsuspend()Resume the process.voidResume the process.default voidTerminate the process.voidTerminate the process.terminatedHandler(Handler<Integer> handler) Set an handler for being notified when the process terminates.default voidSet the process in background.voidtoBackground(Handler<Void> completionHandler) Set the process in background.default voidSet the process in foreground.voidtoForeground(Handler<Void> completionHandler) Set the process in foreground.
-
Method Details
-
status
ExecStatus status()- Returns:
- the current process status
-
exitCode
Integer exitCode()- Returns:
- the process exit code when the status is
ExecStatus.TERMINATEDotherwisenull
-
setTty
-
getTty
Tty getTty()- Returns:
- the process tty
-
setSession
-
getSession
Session getSession()- Returns:
- the process session
-
terminatedHandler
-
run
default void run()Run the process. -
run
void run(boolean foregraound) Run the process. -
interrupt
default boolean interrupt()Attempt to interrupt the process.- Returns:
- true if the process caught the signal
-
interrupt
-
resume
default void resume()Suspend the process. -
resume
default void resume(boolean foreground) Suspend the process. -
resume
-
resume
-
suspend
default void suspend()Resume the process. -
suspend
-
terminate
default void terminate()Terminate the process. -
terminate
-
toBackground
default void toBackground()Set the process in background. -
toBackground
-
toForeground
default void toForeground()Set the process in foreground. -
toForeground
-