io.vertx.rxjava3.ext.shell.command

## Class CommandProcess

- java.lang.Object
- - io.vertx.rxjava3.ext.shell.term.Tty
  - - io.vertx.rxjava3.ext.shell.command.CommandProcess

-     public class CommandProcess
      extends Tty

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

  NOTE: This class has been automatically generated from the `original` non RX-ified interface using Vert.x codegen.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static io.vertx.lang.rx.TypeArg<CommandProcess>` | `__TYPE_ARG`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CommandProcess(CommandProcess delegate)`
    `CommandProcess(Object delegate)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `List<String>` | `args()`
    `List<CliToken>` | `argsTokens()`
    `CommandProcess` | `backgroundHandler(Handler<Void> handler)` Set a background handler, this handler is called when the command is running and put to background.
    `CommandLine` | `commandLine()`
    `void` | `end()` End the process with the exit status
    `void` | `end(int status)` End the process.
    `CommandProcess` | `endHandler(Handler<Void> handler)` Set an end handler, this handler is called when the command is ended, for instance the command is running and the shell closes.
    `boolean` | `equals(Object o)`
    `CommandProcess` | `foregroundHandler(Handler<Void> handler)` Set a foreground handler, this handler is called when the command is running and put to foreground.
    `CommandProcess` | `getDelegate()`
    `int` | `hashCode()`
    `CommandProcess` | `interruptHandler(Handler<Void> handler)` Set an interrupt handler, this handler is called when the command is interrupted, for instance user press `Ctrl-C`.
    `boolean` | `isForeground()`
    `static CommandProcess` | `newInstance(CommandProcess arg)`
    `CommandProcess` | `resizehandler(Handler<Void> handler)` Set a resize handler, the handler is called when the tty size changes.
    `CommandProcess` | `resumeHandler(Handler<Void> handler)` 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` | `session()`
    `CommandProcess` | `stdinHandler(Handler<String> handler)` Set a stream handler on the standard input to read the data.
    `CommandProcess` | `suspendHandler(Handler<Void> handler)` Set a suspend handler, this handler is called when the command is suspended, for instance user press `Ctrl-Z`.
    `String` | `toString()`
    `Vertx` | `vertx()`
    `CommandProcess` | `write(String data)` Write some text to the standard output.

    - ### Methods inherited from class io.vertx.rxjava3.ext.shell.term.Tty

      `height, newInstance, type, width`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### __TYPE_ARG

          public static final io.vertx.lang.rx.TypeArg<CommandProcess> __TYPE_ARG

  - ### Constructor Detail

    - #### CommandProcess

          public CommandProcess(CommandProcess delegate)

    - #### CommandProcess

          public CommandProcess(Object delegate)

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Tty`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Tty`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Tty`

    - #### getDelegate

          public CommandProcess getDelegate()

      Overrides:
        `getDelegate` in class `Tty`

    - #### vertx

          public Vertx vertx()

      Returns:
        the current Vert.x instance

    - #### argsTokens

          public List<CliToken> argsTokens()

      Returns:
        the unparsed arguments tokens

    - #### args

          public List<String> args()

      Returns:
        the actual string arguments of the command

    - #### commandLine

          public CommandLine commandLine()

      Returns:
        the command line object or null

    - #### session

          public Session session()

      Returns:
        the shell session

    - #### isForeground

          public boolean isForeground()

      Returns:
        true if the command is running in foreground

    - #### stdinHandler

          public CommandProcess stdinHandler(Handler<String> handler)

      Description copied from class: `Tty`
      Set a stream handler on the standard input to read the data.
      Overrides:
        `stdinHandler` in class `Tty`
      Parameters:
        `handler` - the standard input
      Returns:
        this object

    - #### interruptHandler

          public CommandProcess interruptHandler(Handler<Void> handler)

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

    - #### suspendHandler

          public CommandProcess suspendHandler(Handler<Void> handler)

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

    - #### resumeHandler

          public CommandProcess resumeHandler(Handler<Void> handler)

      Set a resume handler, this handler is called when the command is resumed, for instance user types `bg` or `fg` to resume the command.
      Parameters:
        `handler` - the interrupt handler
      Returns:
        this command

    - #### endHandler

          public CommandProcess endHandler(Handler<Void> handler)

      Set an end handler, this handler is called when the command is ended, for instance the command is running and the shell closes.
      Parameters:
        `handler` - the end handler
      Returns:
        a reference to this, so the API can be used fluently

    - #### write

          public CommandProcess write(String data)

      Write some text to the standard output.
      Overrides:
        `write` in class `Tty`
      Parameters:
        `data` - the text
      Returns:
        a reference to this, so the API can be used fluently

    - #### backgroundHandler

          public CommandProcess backgroundHandler(Handler<Void> handler)

      Set a background handler, this handler is called when the command is running and put to background.
      Parameters:
        `handler` - the background handler
      Returns:
        this command

    - #### foregroundHandler

          public CommandProcess foregroundHandler(Handler<Void> handler)

      Set a foreground handler, this handler is called when the command is running and put to foreground.
      Parameters:
        `handler` - the foreground handler
      Returns:
        this command

    - #### resizehandler

          public CommandProcess resizehandler(Handler<Void> handler)

      Description copied from class: `Tty`
      Set a resize handler, the handler is called when the tty size changes.
      Overrides:
        `resizehandler` in class `Tty`
      Parameters:
        `handler` - the resize handler
      Returns:
        this object

    - #### end

          public void end()

      End the process with the exit status

    - #### end

          public void end(int status)

      End the process.
      Parameters:
        `status` - the exit status.

    - #### newInstance

          public static CommandProcess newInstance(CommandProcess arg)

Copyright © 2023 Eclipse. All rights reserved.