vertx / io.vertx.ext.shell.command / CommandProcess

CommandProcess

interface CommandProcess : Tty

The command process provides interaction with the process of the command provided by Vert.x Shell.

Author
Julien Viet

Functions

args

abstract fun args(): MutableList<String>

argsTokens

abstract fun argsTokens(): MutableList<CliToken>

backgroundHandler

abstract fun backgroundHandler(handler: Handler<Void>): CommandProcess

Set a background handler, this handler is called when the command is running and put to background.

commandLine

abstract fun commandLine(): CommandLine

end

abstract fun end(): Unit

End the process with the exit status 0

abstract fun end(status: Int): Unit

End the process.

endHandler

abstract fun endHandler(handler: Handler<Void>): CommandProcess

Set an end handler, this handler is called when the command is ended, for instance the command is running and the shell closes.

foregroundHandler

abstract fun foregroundHandler(handler: Handler<Void>): CommandProcess

Set a foreground handler, this handler is called when the command is running and put to foreground.

interruptHandler

abstract fun interruptHandler(handler: Handler<Void>): CommandProcess

Set an interrupt handler, this handler is called when the command is interrupted, for instance user press Ctrl-C.

isForeground

abstract fun isForeground(): Boolean

resizehandler

abstract fun resizehandler(handler: Handler<Void>): CommandProcess

resumeHandler

abstract fun resumeHandler(handler: Handler<Void>): CommandProcess

Set a resume handler, this handler is called when the command is resumed, for instance user types bg or fg to resume the command.

session

abstract fun session(): Session

stdinHandler

abstract fun stdinHandler(handler: Handler<String>): CommandProcess

suspendHandler

abstract fun suspendHandler(handler: Handler<Void>): CommandProcess

Set a suspend handler, this handler is called when the command is suspended, for instance user press Ctrl-Z.

vertx

abstract fun vertx(): Vertx

write

abstract fun write(data: String): CommandProcess

Write some text to the standard output.