public interface Job
JobController
, grouping one or several process.
The job life cycle can be controlled with the run()
, resume()
and suspend()
and interrupt()
methods.Modifier and Type | Method and Description |
---|---|
int |
id() |
boolean |
interrupt()
Attempt to interrupt the job.
|
long |
lastStopped() |
String |
line() |
Process |
process() |
default Job |
resume()
Resume the job to foreground.
|
Job |
resume(boolean foreground)
Resume the job.
|
Job |
run()
Run the job, before running the job a
Tty 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.
|
int id()
ExecStatus status()
long lastStopped()
String line()
Job setTty(Tty tty)
tty
- the tty to useJob setSession(Session session)
session
- the session to useJob statusUpdateHandler(Handler<ExecStatus> handler)
handler
- the terminate handlerboolean interrupt()
default Job resume()
Job toBackground()
Job toForeground()
Job resume(boolean foreground)
foreground
- true when the job is resumed in foregroundJob suspend()
void terminate()
Process process()
Copyright © 2024 Eclipse. All rights reserved.