Job

A job executed in a @see \io\vertx\jphp\ext\shell\system\JobController, grouping one or several process.<p/>

The job life cycle can be controlled with the @see \io\vertx\jphp\ext\shell\system\Job::run, @see \io\vertx\jphp\ext\shell\system\Job::resume and @see \io\vertx\jphp\ext\shell\system\Job::suspend and @see \io\vertx\jphp\ext\shell\system\Job::interrupt methods.

package

Default

Methods

__construct

__construct() 

id

id() : integer

Response

integer

the job id

Attempt to interrupt the job.

interrupt() : boolean

Response

boolean

true if the job is actually interrupted

lastStopped

lastStopped() : integer

Response

integer

when the job was last stopped

line

line() : string

Response

string

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

process

process() : \io\vertx\jphp\ext\shell\system\Process

Response

\io\vertx\jphp\ext\shell\system\Process

the first process in the job

Resume the job to foreground.

resume( $arg0 = null) : $this

resume()

Resume the job.

param $foreground [boolean] true when the job is resumed in foreground resume($foreground)

Arguments

$arg0

boolean

Response

$this

Run the job, before running the job a must be set.

run() : $this

Response

$this

this object

Set a session on the job.

setSession( $arg0) : $this

Arguments

$arg0

Session

Response

$this

this object

Set a tty on the job.

setTty( $arg0) : $this

Arguments

$arg0

Tty

Response

$this

this object

status

status() : string

Response

string

the job exec status

Set an handler called when the job terminates.

statusUpdateHandler( $arg0) : $this

Arguments

$arg0

callable

Response

$this

this object

Resume the job.

suspend() : $this

Response

$this

this object

Terminate the job.

terminate() : void

Send the job to background.

toBackground() : $this

Response

$this

this object

Send the job to foreground.

toForeground() : $this

Response

$this

this object