io.vertx.rxjava.ext.shell.system

## Class Job

- java.lang.Object
- - io.vertx.rxjava.ext.shell.system.Job

-     public class Job
      extends Object

  A job executed in a `JobController`, grouping one or several process.

  The job life cycle can be controlled with the `run()`, `resume()` and `suspend()` and `interrupt()` methods.

  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<Job>` | `__TYPE_ARG`

  - ### Constructor Summary

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

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object o)`
    `Job` | `getDelegate()`
    `int` | `hashCode()`
    `int` | `id()`
    `boolean` | `interrupt()` Attempt to interrupt the job.
    `long` | `lastStopped()`
    `String` | `line()`
    `static Job` | `newInstance(Job arg)`
    `Process` | `process()`
    `Job` | `resume()` Resume the job to foreground.
    `Job` | `resume(boolean foreground)` Resume the job.
    `Job` | `run()` Run the job, before running the job a must be set.
    `Job` | `setSession(Session session)` Set a session on the job.
    `Job` | `setTty(Tty tty)` Set a tty on the job.
    `ExecStatus` | `status()`
    `Job` | `statusUpdateHandler(Handler<ExecStatus> handler)` Set an handler called when the job terminates.
    `Job` | `suspend()` Resume the job.
    `void` | `terminate()` Terminate the job.
    `Job` | `toBackground()` Send the job to background.
    `Job` | `toForeground()` Send the job to foreground.
    `String` | `toString()`

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

  - ### Constructor Detail

    - #### Job

          public Job(Job delegate)

    - #### Job

          public Job(Object delegate)

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### getDelegate

          public Job getDelegate()

    - #### id

          public int id()

      Returns:
        the job id

    - #### status

          public ExecStatus status()

      Returns:
        the job exec status

    - #### lastStopped

          public long lastStopped()

      Returns:
        when the job was last stopped

    - #### line

          public String line()

      Returns:
        the execution line of the job, i.e the shell command line that launched this job

    - #### setTty

          public Job setTty(Tty tty)

      Set a tty on the job.
      Parameters:
        `tty` - the tty to use
      Returns:
        this object

    - #### setSession

          public Job setSession(Session session)

      Set a session on the job.
      Parameters:
        `session` - the session to use
      Returns:
        this object

    - #### statusUpdateHandler

          public Job statusUpdateHandler(Handler<ExecStatus> handler)

      Set an handler called when the job terminates.
      Parameters:
        `handler` - the terminate handler
      Returns:
        this object

    - #### run

          public Job run()

      Run the job, before running the job a must be set.
      Returns:
        this object

    - #### interrupt

          public boolean interrupt()

      Attempt to interrupt the job.
      Returns:
        true if the job is actually interrupted

    - #### resume

          public Job resume()

      Resume the job to foreground.
      Returns:

    - #### toBackground

          public Job toBackground()

      Send the job to background.
      Returns:
        this object

    - #### toForeground

          public Job toForeground()

      Send the job to foreground.
      Returns:
        this object

    - #### resume

          public Job resume(boolean foreground)

      Resume the job.
      Parameters:
        `foreground` - true when the job is resumed in foreground
      Returns:

    - #### suspend

          public Job suspend()

      Resume the job.
      Returns:
        this object

    - #### terminate

          public void terminate()

      Terminate the job.

    - #### process

          public Process process()

      Returns:
        the first process in the job

    - #### newInstance

          public static Job newInstance(Job arg)

Copyright © 2024 Eclipse. All rights reserved.