Package: io.vertx.groovy.ext.shell.command

## [Groovy] Class CommandProcess

- io.vertx.groovy.ext.shell.command.CommandProcess

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

- - ### Constructor Summary

    Constructors
    Constructor and description
    `CommandProcess (java.lang.Object delegate)`

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `java.util.List<java.lang.String>` | `args()` @return the actual string arguments of the command
    `java.util.List<CliToken>` | `argsTokens()` @return the unparsed arguments tokens
    `CommandProcess` | `backgroundHandler(io.vertx.core.Handler<java.lang.Void> handler)` Set a background handler, this handler is called when the command is running and put to background.
    `CommandLine` | `commandLine()` @return the command line object or null
    `void` | `end()` End the process with the exit status
    `void` | `end(int status)` End the process.
    `CommandProcess` | `endHandler(io.vertx.core.Handler<java.lang.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.
    `CommandProcess` | `foregroundHandler(io.vertx.core.Handler<java.lang.Void> handler)` Set a foreground handler, this handler is called when the command is running and put to foreground.
    `java.lang.Object` | `getDelegate()`
    `CommandProcess` | `interruptHandler(io.vertx.core.Handler<java.lang.Void> handler)` Set an interrupt handler, this handler is called when the command is interrupted, for instance user press `Ctrl-C`.
    `boolean` | `isForeground()` @return true if the command is running in foreground
    `CommandProcess` | `resizehandler(io.vertx.core.Handler<java.lang.Void> handler)`
    `CommandProcess` | `resumeHandler(io.vertx.core.Handler<java.lang.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()` @return the shell session
    `CommandProcess` | `stdinHandler(io.vertx.core.Handler<java.lang.String> handler)`
    `CommandProcess` | `suspendHandler(io.vertx.core.Handler<java.lang.Void> handler)` Set a suspend handler, this handler is called when the command is suspended, for instance user press `Ctrl-Z`.
    `Vertx` | `vertx()` @return the current Vert.x instance
    `CommandProcess` | `write(java.lang.String data)` Write some text to the standard output.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Tty` | `getDelegate, height, resizehandler, stdinHandler, type, width, write`

- - ### Constructor Detail

    - #### CommandProcess(java.lang.Object delegate)

  - ### Method Detail

    - #### java.util.List<java.lang.String> args()

      Returns:
        the actual string arguments of the command

    - #### java.util.List<CliToken> argsTokens()

      Returns:
        the unparsed arguments tokens

    - #### CommandProcess backgroundHandler(io.vertx.core.Handler<java.lang.Void> handler)

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

      Returns:
        this command
      Parameters:
        `handler` - the background handler

    - #### CommandLine commandLine()

      Returns:
        the command line object or null

    - #### void end()

      End the process with the exit status

    - #### void end(int status)

      End the process.

      Parameters:
        `status` - the exit status.

    - #### CommandProcess endHandler(io.vertx.core.Handler<java.lang.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.

      Returns:
        a reference to this, so the API can be used fluently
      Parameters:
        `handler` - the end handler

    - #### CommandProcess foregroundHandler(io.vertx.core.Handler<java.lang.Void> handler)

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

      Returns:
        this command
      Parameters:
        `handler` - the foreground handler

    - #### java.lang.Object getDelegate()

    - #### CommandProcess interruptHandler(io.vertx.core.Handler<java.lang.Void> handler)

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

      Returns:
        this command
      Parameters:
        `handler` - the interrupt handler

    - #### boolean isForeground()

      Returns:
        true if the command is running in foreground

    - #### CommandProcess resizehandler(io.vertx.core.Handler<java.lang.Void> handler)

    - #### CommandProcess resumeHandler(io.vertx.core.Handler<java.lang.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.

      Returns:
        this command
      Parameters:
        `handler` - the interrupt handler

    - #### Session session()

      Returns:
        the shell session

    - #### CommandProcess stdinHandler(io.vertx.core.Handler<java.lang.String> handler)

    - #### CommandProcess suspendHandler(io.vertx.core.Handler<java.lang.Void> handler)

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

      Returns:
        this command
      Parameters:
        `handler` - the interrupt handler

    - #### Vertx vertx()

      Returns:
        the current Vert.x instance

    - #### CommandProcess write(java.lang.String data)

      Write some text to the standard output.

      Returns:
        a reference to this, so the API can be used fluently
      Parameters:
        `data` - the text