Package io.vertx.ext.shell.system
Interface Process
-
public interface ProcessA process managed by the shell.- Author:
- Julien Viet
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description IntegerexitCode()SessiongetSession()TtygetTty()default booleaninterrupt()Attempt to interrupt the process.booleaninterrupt(Handler<Void> completionHandler)Attempt to interrupt the process.default voidresume()Suspend the process.default voidresume(boolean foreground)Suspend the process.voidresume(boolean foreground, Handler<Void> completionHandler)Suspend the process.default voidresume(Handler<Void> completionHandler)Suspend the process.default voidrun()Run the process.voidrun(boolean foregraound)Run the process.ProcesssetSession(Session session)Set the process sessionProcesssetTty(Tty tty)Set the process tty.ExecStatusstatus()default voidsuspend()Resume the process.voidsuspend(Handler<Void> completionHandler)Resume the process.default voidterminate()Terminate the process.voidterminate(Handler<Void> completionHandler)Terminate the process.ProcessterminatedHandler(Handler<Integer> handler)Set an handler for being notified when the process terminates.default voidtoBackground()Set the process in background.voidtoBackground(Handler<Void> completionHandler)Set the process in background.default voidtoForeground()Set the process in foreground.voidtoForeground(Handler<Void> completionHandler)Set the process in foreground.
-
-
-
Method Detail
-
status
ExecStatus status()
- Returns:
- the current process status
-
exitCode
Integer exitCode()
- Returns:
- the process exit code when the status is
ExecStatus.TERMINATEDotherwisenull
-
setTty
Process setTty(Tty tty)
Set the process tty.- Parameters:
tty- the process tty- Returns:
- this object
-
getTty
Tty getTty()
- Returns:
- the process tty
-
setSession
Process setSession(Session session)
Set the process session- Parameters:
session- the process session- Returns:
- this object
-
getSession
Session getSession()
- Returns:
- the process session
-
terminatedHandler
Process terminatedHandler(Handler<Integer> handler)
Set an handler for being notified when the process terminates.- Parameters:
handler- the handler called when the process terminates.- Returns:
- this object
-
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
boolean interrupt(Handler<Void> completionHandler)
Attempt to interrupt the process.- Parameters:
completionHandler- handler called after interrupt callback- Returns:
- true if the process caught the signal
-
resume
default void resume()
Suspend the process.
-
resume
default void resume(boolean foreground)
Suspend the process.
-
resume
default void resume(Handler<Void> completionHandler)
Suspend the process.- Parameters:
completionHandler- handler called after resume callback
-
resume
void resume(boolean foreground, Handler<Void> completionHandler)Suspend the process.- Parameters:
completionHandler- handler called after resume callback
-
suspend
default void suspend()
Resume the process.
-
suspend
void suspend(Handler<Void> completionHandler)
Resume the process.- Parameters:
completionHandler- handler called after suspend callback
-
terminate
default void terminate()
Terminate the process.
-
terminate
void terminate(Handler<Void> completionHandler)
Terminate the process.- Parameters:
completionHandler- handler called after end callback
-
toBackground
default void toBackground()
Set the process in background.
-
toBackground
void toBackground(Handler<Void> completionHandler)
Set the process in background.- Parameters:
completionHandler- handler called after background callback
-
toForeground
default void toForeground()
Set the process in foreground.
-
-