io.vertx.ext.shell.system

## Interface Process

-     public interface Process

  A process managed by the shell.
  Author:
    Julien Viet

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `Integer` | `exitCode()`
    `Session` | `getSession()`
    `Tty` | `getTty()`
    `default boolean` | `interrupt()` Attempt to interrupt the process.
    `boolean` | `interrupt(Handler<Void> completionHandler)` Attempt to interrupt the process.
    `default void` | `resume()` Suspend the process.
    `default void` | `resume(boolean foreground)` Suspend the process.
    `void` | `resume(boolean foreground, Handler<Void> completionHandler)` Suspend the process.
    `default void` | `resume(Handler<Void> completionHandler)` Suspend the process.
    `default void` | `run()` Run the process.
    `default void` | `run(boolean foreground)` Run the process.
    `void` | `run(boolean foregraound, Handler<Void> completionHandler)` Run the process.
    `default void` | `run(Handler<Void> completionHandler)` Run the process.
    `Process` | `setSession(Session session)` Set the process session
    `Process` | `setTty(Tty tty)` Set the process tty.
    `ExecStatus` | `status()`
    `default void` | `suspend()` Resume the process.
    `void` | `suspend(Handler<Void> completionHandler)` Resume the process.
    `default void` | `terminate()` Terminate the process.
    `void` | `terminate(Handler<Void> completionHandler)` Terminate the process.
    `Process` | `terminatedHandler(Handler<Integer> handler)` Set an handler for being notified when the process terminates.
    `default void` | `toBackground()` Set the process in background.
    `void` | `toBackground(Handler<Void> completionHandler)` Set the process in background.
    `default void` | `toForeground()` Set the process in foreground.
    `void` | `toForeground(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.TERMINATED` otherwise `null`

    - #### 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

          default void run(boolean foreground)

      Run the process.

    - #### run

          default void run(Handler<Void> completionHandler)

      Run the process.
      Parameters:
        `completionHandler` - handler called after process callback

    - #### run

          void run(boolean foregraound,
                   Handler<Void> completionHandler)

      Run the process.
      Parameters:
        `completionHandler` - handler called after process callback

    - #### 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.

    - #### toForeground

          void toForeground(Handler<Void> completionHandler)

      Set the process in foreground.
      Parameters:
        `completionHandler` - handler called after foreground callback

Copyright © 2017. All rights reserved.